Case 1
When user connect for first time.
It send the presence available
to server. Chat works fine in this case.
Presence recieved :
<presence xmlns="jabber:client" from="***a52ce0a@localhost/2169635904633549718426" to="***a52ce0a@localhost/2169635904633549718426"/
Case 2
When connection disconnect mostly due to internet.
On connecting to internet again. XmmpStream
connect automatically as set initially. But now it is sending this presence response :
Presence recieved(Three times this time.) :
<presence xmlns="jabber:client" from="58fdb5192bd7c1205a52ce0a@localhost/6962759452435694889430" to="58fdb5192bd7c1205a52ce0a@localhost/6962759452435694889430"/>`
<presence xmlns="jabber:client" from="58fdb5192bd7c1205a52ce0a@localhost/2169635904633549718426" to="58fdb5192bd7c1205a52ce0a@localhost/6962759452435694889430"><delay xmlns="urn:xmpp:delay" from="58fdb5192bd7c1205a52ce0a@localhost/2169635904633549718426" stamp="2017-04-25T06:33:04.442Z"/></presence>
<presence xmlns="jabber:client" from="58fdb5192bd7c1205a52ce0a@localhost/2169635904633549718426" to="58fdb5192bd7c1205a52ce0a@localhost/6962759452435694889430" type="unavailable"/> // Why unavailable automatically.
By observing the response, I guess it is now connected to diffrent session from the same user. So Offline message will not come to this.
Is this from iOS side or from ejabbered side?
Why it is creating different session on reconnection automatically. If it is not creating different session, then why offline message are not coming.