XMPPFramework - 存在不变
我正在尝试将用户的状态设置为离开(或目前的任何设置)。我正在使用以下代码,但它似乎没有做任何事情。
XMPPPresence *presence = [XMPPPresence presence];
NSXMLElement *show = [NSXMLElement elementWithName:@"show" stringValue:@"away"];
NSXMLElement *status = [NSXMLElement elementWithName:@"status" stringValue:@"away"];
[presence addChild:show];
[presence addChild:status];
[[self xmppStream] sendElement:presence];
我使用 iChat 来确保我的 Ejabberd 服务器上的所有状态订阅都正确且有效。这让我发疯,我错过了什么吗?
I'm trying to set the users presence to away (or anything at the moment). I'm using the following code but it doesn't seem to do anything.
XMPPPresence *presence = [XMPPPresence presence];
NSXMLElement *show = [NSXMLElement elementWithName:@"show" stringValue:@"away"];
NSXMLElement *status = [NSXMLElement elementWithName:@"status" stringValue:@"away"];
[presence addChild:show];
[presence addChild:status];
[[self xmppStream] sendElement:presence];
I've used iChat to make sure all the presence subscriptions on my Ejabberd server are correct and working. This is driving me crazy, am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想通了,事实证明应用程序没有发送出存在,因为我错过了这一点:
现在工作完美
I figured it out, turns out the presence wasn't being sent out by the app as I'd missed this out:
Works perfectly now