Server is Openfire with custom component running and Client is iOS
1> User1 authenticates and then creates room1 and then sends a
presence to server_comp
2> Server_comp invites User2 to join room1 on behalf of User1
3> User2 accepts the invitation and joins the room.
4> All the message stanza conversation continues well.
I want to notify User2 whenever there is location coordinate changes at User1 client side. This I want to do through presence stanza.
Now User1 sending presence stanza without mentioning presence.type (available) to the room jid along with location element.
The presence stanza from User1 to room is not received at User2.
I have this delegate implemented, but this never hits. What is the use of this delegate?
-(void)xmppRoom:(XMPPRoom *)sender occupantDidUpdate:(XMPPJID *)occupantJID withPresence:(XMPPPresence *)presence {
NSLog(@"%@ updated status with presence %@",[occupantJID full], presence.debugDescription);
}
If i send default presence like unavailable type etc it works fine. I referred XMPP definite book and other online docs but could not find any help.
Now my understanding is the custom edited (added location attributes to the presence) presence is simply ignored by the room itself. MUC might be ignoring presence with other non-understandable elements. Is this my understanding correct?
I have a second question as:
The server component invites User2 to join User1 created room. Once user2 joins the room, then after some time if any of the user1/user2 left the room then why the server_comp also gets a unavailable presence though the comp itself is not part of the room? Is it like because server_comp invites User2 on behalf of user1?