Ejabberd with Stream management (XEP-198) not using offline message hook

回眸只為那壹抹淺笑 提交于 2020-03-21 10:35:33

问题


We are developing an app with a chat feature. We have an ejabberd (15.02) configured to use mod_offline_post to use the offline message hook and forward all messages for offline clients to an url of our own which then forwards to the GCM.

However as we are developing an app, we also need XEP-198 (stream management) enabled to handle connection loss. This is working fine in itself. Streams are created and resumed, messages are acknowledged.

The problem is, that the jabber is waiting for a stream to resume and is not forwarding any offline messages to the offline message hook and thus to our mod and post url. It is storing them in its offline storage of course and they get delivered when the recipient resumes its stream.

Is there any way to configure the jabber to call the offline message hook while ejabberd_c2s:fsm_next_state:2517 Waiting for resumption of stream for... ?

PS: We use smack on the client side to provide stream management


回答1:


In my understanding the behaviour of ejabberd is correct from the XMPP specification point of view. It is doing the right thing and should not in that case forward message to the offline store, because you are not offline technically.

It is just not the right place to place your push processing.



来源:https://stackoverflow.com/questions/28803743/ejabberd-with-stream-management-xep-198-not-using-offline-message-hook

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