是否有任何选项可以在开放式服务器上禁用群聊消息历史记录?

Jat*_* JP 4 iphone chat xmpp openfire ios

我一直在创建group chat application,同时实现群聊功能我面临的问题,当我每次join the room, open fire sends last two days messages.

这是我每次加入房间时都会收到的帖子.

<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>
Run Code Online (Sandbox Code Playgroud)

任何好友可以表明,哪里是选项disable history messageopen fire server?所以我只会收到一次消息.

提前致谢.

vit*_*ter 5

你应该禁止群聊天记录,你应该指定您不希望接收的历史,如在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>
Run Code Online (Sandbox Code Playgroud)

您的XMPP库应该能够指定加入数据包的房间的"maxchars"或"maxstanzas"或"seconds"属性.