In my application if i am sending invitation to other user then moderator and all user who got the request will join the room but if another user will send the request to all then moderator of previous room is not getting invitation.
For Example:
user 1 will send invitation for Room 1 to user 2 and user 3 then all three are in Room 1.
if User 2 will send invitation for Room 2 to User 1 and User 3 then User 1 will is not getting invitation.
And also if User 3 will send invitation for Room 3 then User 3 only be present in Room and all other two are not getting invitation too.
In my application i am inviting other user with this request
XMPPRoomMemoryStorage * _roomMemory = [[XMPPRoomMemoryStorage alloc]init];
NSString* roomID = [NSString stringWithFormat:@"RoomName@conference.openfire id"];
XMPPJID * roomJID = [XMPPJID jidWithString:roomID];
xmppRoom = [[XMPPRoom alloc] initWithRoomStorage:_roomMemory jid:roomJID dispatchQueue:dispatch_get_main_queue()];
[xmppRoom addDelegate:_roomMemory delegateQueue:dispatch_get_main_queue()];
[xmppRoom activate:xmppStream];
[xmppRoom joinRoomUsingNickname:[NSString stringWithFormat:@"%@",strCureentUserName] history:nil];
//.........inviting the Friend.......
for (int i=0; i<[arrUserName count];i++) {
[xmppRoom inviteUser:[XMPPJID jidWithString:[NSString stringWithFormat:@"Invite user's ID"]] withMessage:@"Come Join me in this room"];
}
[xmppRoom fetchConfigurationForm];
[xmppRoom configureRoomUsingOptions:nil];
and other user gets invitation here
- (void)xmppStream:(XMPPStream *)sender didReceiveMessage:(XMPPMessage *)message
{
NSXMLElement * x = [message elementForName:@"x" xmlns:XMPPMUCUserNamespace];
NSXMLElement * invite = [x elementForName:@"invite"];
NSXMLElement * decline = [x elementForName:@"decline"];
NSXMLElement * directInvite = [message elementForName:@"x" xmlns:@"jabber:x:conference"];
NSString *msg1 = [[message elementForName:@"body"]stringValue];
NSString *from1 = [[message attributeForName:@"from"]stringValue];
if (invite || directInvite)
{
NSLog(@"come in invite method of if condition");
[self createAndEnterRoom:from1 Message:msg1];
return;
}
How to get invitation from all user all the time.
Any kind of help is welcomed...
Thanks in Advance.