Not getting unavailable presence of User A when User B is also unavailable

て烟熏妆下的殇ゞ 提交于 2019-12-23 23:28:06

问题


I am working on a chat application. I am adding functionality to get unavailable status of the user. Following the situation where i am not getting the unavailable presence of the user

There are 2 users User A and user B and both are available

First User A goes unavailable and User b gets unavailable presence of User A , so its working fine, Then user B goes unavailable and then User A become available here problems occur the User A does not receive offline Unavailable presence of User B.

But when User A is Unavailable and then user B become available and then User A become available then in that case USer A is getting offline available presence of User B so its working fine.

So here the problem is only in case of offline unavailable presence of other users are not coming. but offline available presence are coming

below is the code i am using for going available and unavailable

 - (void)goOnline {
     XMPPPresence *presence = [XMPPPresence presence]; // type="available" is implicit
 [[self xmppStream] sendElement:presence];
}

- (void)goOffline {
XMPPPresence *presence = [XMPPPresence presenceWithType:@"unavailable"];
[[self xmppStream] sendElement:presence];

}

Thanks in advance of any kind of help in this :-)

来源:https://stackoverflow.com/questions/24446717/not-getting-unavailable-presence-of-user-a-when-user-b-is-also-unavailable

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!