Reputation: 115
I am creating room with Xmmp open fire ,first time its working fine and if group admin go to offline then all member left room ,when come to online not join the room . how to rejoin the room ? !
Upvotes: 0
Views: 642
Reputation: 123
After creating room set your XMPP Room persistent using below code...
-(void)xmppRoomDidJoin:(XMPPRoom *)sender {
NSLog("I did join.");
[sender fetchConfigurationForm];
}
-(void)xmppRoom:(XMPPRoom *)sender didFetchConfigurationForm:(NSXMLElement *)configForm {
NSXMLElement *newConfig = [configForm copy];
NSArray *fields = [newConfig elementsForName:@"field"];
for (NSXMLElement *field in fields) {
NSString *var = [field attributeStringValueForName:@"var"];
// Make Room Persistent
if ([var isEqualToString:@"muc#roomconfig_persistentroom"]) {
[field removeChildAtIndex:0];
[field addChild:[NSXMLElement elementWithName:@"value" stringValue:@"1"]];
}
}
[sender configureRoomUsingOptions:newConfig];
}
that time if room owner is offline that time XMPP Room is exist with all member
Upvotes: 0
Reputation: 9055
This is how XMPP Multi-User Chat works. Multi-User Chat specification is presence-based. When you are offline, you are not an occupant of the room.
Upvotes: 2