0

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.

NAVEEN KUMAR
  • 669
  • 6
  • 25
Bhupesh Kumar
  • 369
  • 2
  • 18
  • which version of ejabberd you are using? if latest you should use XEP-0013: Flexible Offline Message Retrieval for getting offline message. – Sunil Singh Apr 25 '17 at 08:34
  • I figured out the problem by checking user status on the server. As App can not send presence on no internet connection. So at the server side it is remaining online forever means no offline queue. And due this loss of messages. Any solution now? – Bhupesh Kumar Apr 26 '17 at 07:52
  • 1
    you can enabled mod_ping for this issue. check this link-http://stackoverflow.com/questions/42291862/user-is-still-online-although-user-is-not-connected-to-the-server-and-failed-to/42322168#42322168 – Sunil Singh Apr 26 '17 at 09:08
  • 1
    also enable stream mangement both client and server side. – Sunil Singh Apr 26 '17 at 09:19

0 Answers0