How to receive message stanza without sending self presence?

微笑、不失礼 提交于 2020-01-06 06:35:49

问题


I am using mongooseim with Android and Ios application. I just want to receive message from the server from background without sending self presence to anyone because this task is done by system. But I can't receive message stanza until I send my presence to the mongooseIM.

Do I missing something or there is a way by which I can get quick update from MongooseIM server in the background without sending presence?


回答1:


As far as I understand you all you want to do is sync the messages when you receive a Push Notification. MongooseIM can be configured to serve a simple HTTP API with which you can get archived messages (mod_mam needs to be enabled) without establishing the XMPP connection. More details can be found in the HTTP API doc, especially the Swagger doc regarding get messages. Let me know if this suites you.



来源:https://stackoverflow.com/questions/54496882/how-to-receive-message-stanza-without-sending-self-presence

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!