简体   繁体   English

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

[英]Is there any option to disable group-chat message history on open-fire server?

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. 我一直在创建group chat application ,同时实现群聊功能我遇到问题,当我每次join the roomopen 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="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>

Can any buddy suggest that where is option to disable history message on open fire server ? 任何伙伴都可以建议在open fire serverdisable history message选项在哪里? So I will get each message only once. 所以我只会收到一次消息。

Thanks in advance. 提前致谢。

You should NOT disable group-chat history, you should specify that you does not want to receive history, as described in XEP-0045 : 不应禁用组聊天记录,你应该指定您不希望接收的历史,如在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>

Your XMPP library should be able to specify "maxchars" or "maxstanzas" or "seconds" property of the room joining packet. 您的XMPP库应该能够指定加入数据包的房间的“maxchars”或“maxstanzas”或“seconds”属性。

Yes there is, but I do not recommend it! 是的,但是我不推荐它! At the web admin page go to Group Chat section, in there, go to Group Chat Settings. 在Web管理页面上,转到“群聊”部分,在那里,转到群聊设置。 If you don't have already, create a new service, then click it. 如果您还没有,请创建一个新服务,然后单击它。 It will take you to the Group Chat Service Properties. 它将带您进入群聊服务属性。 There on the left side, you'll find the History Settings, where you can set your history settings as you want it. 在左侧,您可以找到历史记录设置,您可以在其中根据需要设置历史记录设置。

Images: 图片:

步骤1。

第2步。

The best thing that I have found to do when managing any conversation history is to simply modify the embedded-db.script file. 在管理任何对话历史记录时,我发现要做的最好的事情就是简单地修改embedded-db.script文件。 Just edit it will notepad++ and delete anything with the following statements (INSERT INTO OFPROPERTY VALUES) or (INSERT INTO OFROSTERGROUPS VALUES) or (INSERT INTO OFID VALUES) . 只需编辑它就会记录++并删除任何带有以下语句的东西(INSERT INTO OFPROPERTY VALUES)(INSERT INTO OFROSTERGROUPS VALUES)(INSERT INTO OFID VALUES) This will clear all chat history, including your group chat. 这将清除所有聊天记录,包括您的群聊。 You can sift through and delete only what you need of course. 您可以筛选并删除当然需要的内容。 I would copy and paste the DB in case you delete something you need--make sure you stop the server first... 我会复制并粘贴数据库,以防您删除所需内容 - 确保先停止服务器...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM