tolgatanriverdi
tolgatanriverdi

Reputation: 581

XMPP Getting Room Configuration Change Messages While Offline

We are using XMPPFramework for IOS to implement chat functions to our mobile applications. We've changing the room name functionality and when an admin changes the room name, server sends message to all group receipants, when all the receipants are online there is no problem however when a user is not joined to group(not connected at that time) he is not able to receive the message even when he is back and online again.

We are using history parameter to retrieve old messages in group, but we cannot receive these configuration changes (and also the information of users added or banned from server) messages. Do you know how can we solve that?

NSXMLElement *history = [NSXMLElement elementWithName:@"history"];
[history addAttributeWithName:@"seconds" stringValue:[NSString stringWithFormat:@"%.0f",disconnetSecond]];
[xmppRoom joinRoomUsingNickname:cusername history:history];

Thanks

Upvotes: 0

Views: 738

Answers (2)

Mickaël Rémond
Mickaël Rémond

Reputation: 9055

With ejabberd, you can use the new MUC/Sub approach and subscribe to configuration changes on node "urn:xmpp:mucsub:nodes:config". The specification is described here: https://docs.ejabberd.im/developer/xmpp-clients-bots/proposed-extensions/muc-sub/ You would have to add support in XMPPFramework as it is not yet supported, but that should do what you need. You could be able to place in your offline store the configuration changes.

Upvotes: 2

Shoaib Ahmad Gondal
Shoaib Ahmad Gondal

Reputation: 646

If you are using Room Subject as room name then it's automatically supported in XMPP. Also changing room subject is supported and it's sent to a user when he joins room. So ultimately whenever you will join the room, you will get updated subject and you can show it on the UI or even you can show to user that name has been changed.

You just need to follow the directions as defined in XEP-0045: Multi-User Chat

Upvotes: 0

Related Questions