Message loss airplane mode

hi everybody, we are making an app whatsapp like, we have installed ejabberd community edition but we have a problem. for example we use two users: a and b, if are both connected all works fine, if A is connected and B close the app in web admin a result online and b offline, if A send message to B, the message will send as soon as B become online and all works fine! The problem is if B enable airplane mode, in this case in web admin i see B online so if A send a message to B the message will be lost!

Is there a way to prevent this? Can xep 0198 solve this? Or i have to use another xep?
If i use mod Ping?
Thanks and please forgive my poor english!

Please help me thanks!

Enabling stream management

Enabling stream management should solve this. Stream management is designed as a solution for unreliable network. When the user enables flight mode while in the app, the server has no way to decide if the user is online or not. It keeps the connection open until 'tcp_timeout' even if the user is not connected to network. The server assumes that the user is connected and relays the messages to him which ofcourse is lost.

After enabling stream management, the messages are kept in a queue on the server and are deleted only after an ack from the user.

You might also want to look

You might also want to look into our FAQ entry on that topic. And possibly into server-side archiving.

Syndicate content