Sending custom edited presence to XMPP MUC room
<p>Server is Openfire with custom component  running and Client is iOS</p>

<pre><code>1&gt; User1 authenticates and then creates room1 and then sends a
presence to server_comp

2&gt; Server_comp invites User2 to join room1 on behalf of User1

3&gt; User2 accepts the invitation and joins the room.

4&gt; All the message stanza conversation continues well.
</code></pre>

<p>I want to notify User2 whenever there is location coordinate changes at User1 client side. This I want to do through presence stanza.</p>

<p>Now User1 sending presence stanza without mentioning presence.type (available) to the room jid along with location element.</p>

<p><strong>The presence stanza from User1 to room is not received at User2.</strong></p>

<p>I have this delegate implemented, but this never hits. What is the use of this delegate?</p>

<pre><code>-(void)xmppRoom:(XMPPRoom *)sender occupantDidUpdate:(XMPPJID *)occupantJID withPresence:(XMPPPresence *)presence {
  NSLog(@"%@ updated status with presence %@",[occupantJID full], presence.debugDescription);
 }
</code></pre>

<p>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.</p>

<p>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?</p>

<p>I have a second question as:</p>

<p>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?</p>