我一直在创建群聊应用
,在实现群聊功能时我遇到了问题,当我每次加入房间
时,开火发送最近两天的消息。
这是我每次加入房间时收到的帖子消息。
<message xmlns="jabber:client" id="05qEM-18" to="210@openfire.indianic.net/94e509b9" type="groupchat" from="top@conference.openfire.indianic.net/258"><body>Very good morning!!!</body><delay xmlns="urn:xmpp:delay" stamp="2014-03-19T05:15:06.542Z" from="258@openfire.indianic.net/Smack"/><x xmlns="jabber:x:delay" stamp="20140319T05:15:06" from="258@openfire.indianic.net/Smack"/></message>
哪位大侠可以指点一下open fire server
上disable history message
的选项在哪里?
所以我只会收到每条消息一次。
提前致谢。
最佳答案
您应该不禁用群聊历史记录,您应该指定您不想接收历史记录,如XEP-0045 中所述。 :
<presence
from='hag66@shakespeare.lit/pda'
id='n13mt3l'
to='coven@chat.shakespeare.lit/thirdwitch'>
<x xmlns='http://jabber.org/protocol/muc'>
<history maxchars='0'/>
</x>
</presence>
您的 XMPP 库应该能够指定房间加入数据包的“maxchars”或“maxstanzas”或“seconds”属性。
关于ios - 是否有任何选项可以禁用 open-fire 服务器上的群聊消息历史记录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22496868/