本文介绍了是否有任何选项可以在开火服务器上禁用组聊天消息历史记录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在创建group chat application,同时实现群聊功能时遇到的问题是,每次我join the roomopen fire sends last two days messages.

I have been creating group chat application, while implementing group chat functionality I am facing problem, that when I every time join the room, open fire sends last two days messages.

这是我每次加入会议室时都会收到的帖子信息.

Here is post message which I get every time when I join the room.

<message xmlns="jabber:client" id="05qEM-18" to="[email protected]/94e509b9" type="groupchat" from="[email protected]/258"><body>Very good morning!!!</body><delay xmlns="urn:xmpp:delay" stamp="2014-03-19T05:15:06.542Z" from="[email protected]/Smack"/><x xmlns="jabber:x:delay" stamp="20140319T05:15:06" from="[email protected]/Smack"/></message>

任何伙伴都可以建议open fire server上的disable history message选项在哪里?因此,我只会收到每条消息一次.

Can any buddy suggest that where is option to disable history message on open fire server? So I will get each message only once.

提前谢谢.

推荐答案

您应禁用组聊天历史记录,应指定您不想接收历史记录,如 XEP-0045 :

You should NOT disable group-chat history, you should specify that you does not want to receive history, as described in XEP-0045:

<presence
    from='[email protected]/pda'
    id='n13mt3l'
    to='[email protected]/thirdwitch'>
  <x xmlns='http://jabber.org/protocol/muc'>
    <history maxchars='0'/>
  </x>
</presence>

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

Your XMPP library should be able to specify "maxchars" or "maxstanzas" or "seconds" property of the room joining packet.

这篇关于是否有任何选项可以在开火服务器上禁用组聊天消息历史记录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 12:27