When creating a chatroom, I add an id to the presence stanza, formed of a constant string part plus an integer representing the sequence number of the message.
The process is the following:
- Create the room:
Send the normal create room stanza:
<presence to="some_room@conference.something.net/joao.figueiras@something.net" from="joao.figueiras@something.net/default" id="MUC-63da4686dfb57abe-3" xmlns="jabber:client">
<x xmlns="http://jabber.org/protocol/muc" />
</presence>
- Join the room:
Sending the same stanza as above but with a different id attribute:
presence to="some_room@conference.something.net/joao.figueiras@something.net" id="MUC-63da4686dfb57abe-4" xmlns="jabber:client">
<x xmlns="http://jabber.org/protocol/muc">
<history maxstanzas="0" />
</x>
When I ran this, I get a normal response to the first message but the second presence response comes with the id of the first one.
So the response to both the above presence messages is:
Available presence - <presence to="joao.figueiras@something.net/default" from="some_room@conference.something.net/joao.figueiras@something.net" id="MUC-63da4686dfb57abe-3" xmlns="jabber:client">
<x xmlns="http://jabber.org/protocol/muc#user">
<item jid="joao.figueiras@something.net/default" affiliation="owner" role="moderator" />
<status code="110" />
<status code="100" />
</x>
I was expecting the second response to have an id ending with "-4" instead of "-3".
If I use openfire 3.9.3 this is not an issue, only when I moved to 4.0.2. Are the stanza's ids managed differently in the new version?
Thanks,
Joao