ejabberd MUC message history

梦想与她 提交于 2019-12-13 13:25:38

问题


I'm using ejabberd XMPP server for a chat client, which also has a group-chat function. My problem is, that when a new user joins a group room, he only gets the first 20 messages from the room, although the history_size is set to 200(for now). On the client side, when a new user joins the room, the presence stanza contains the history element, asking for messages sent after 1970. The server time is at 2014, so theoretically it should send out all the message, or at least 200.

ejabberd.cfg muc fragment:

{mod_muc,      [
                  %%{host, "conference.@HOST@"},
                  {access, muc},
                  {access_create, muc},
                  {access_persistent, muc},
                  {access_admin, muc_admin},
                  {history_size, 50},
                  {max_users, 500}
]}

XMPP stanza sent to join a room:

<presence
    from='someusername@host'
    id='someid'
    to='somegroup@ccc.host/somenickname'>
  <x xmlns='http://jabber.org/protocol/muc'>
    <history since='1970-01-01T00:00:00Z'/>
  </x>
</presence>

来源:https://stackoverflow.com/questions/22508250/ejabberd-muc-message-history

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