验证密码后如何处理XMPP返回两个消息

问题描述

因为我打电话时,我们的服务器进行了一些更改以使其开火

xmppStream.authenticate(withPassword: self.password ?? "")

我将收到两个消息,第一个用户信息,第二个是成功。如您所知,流动代码是XMPPFrame在验证密码后处理消息的方式。

- (XMPPHandleAuthResponse)handleAuth:(NSXMLElement *)authResponse
{
    XMPPLogTrace();
    
    // We're expecting a success response.
    // If we get anything else we can safely assume it's the equivalent of a failure response.
    
    if ([[authResponse name] isEqualToString:@"success"])
    {
        return XMPPHandleAuthResponseSuccess;
    }
    else
    {
        return XMPPHandleAuthResponseFailed;
    }
}

所以我的代码总是执行以下委托方法

func xmppStream(_ sender: XMPPStream,didNotAuthenticate error: DDXMLElement)

我知道服务器中的服务器响应用户信息消息是否可以解决,是否有其他解决方案来处理这两个消息问题。

我希望我已经清楚地解释了这个问题,谢谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)