Getting MUC messages from Ejabberd

I am building a chat application using Ejabberd.

I am using mod_mam from master repo. I am having 1-1 as well as MUC.

I am not able to query the MUC messages from the archive and it always gives 0 results. I have verified that the messages are getting archived in database. So I suspect it is the request for MUC messages, which is wrong.

Below is the request XML which is going and resulting in 0 results.

<iq type="set" id="333_vishal007@localhost"><query xmlns="urn:xmpp:mam:1"><x xmlns="jabber:x:data" type="submit"><field var="FORM_TYPE" type="hidden"><value>urn:xmpp:mam:1</value></field><field var="with"><value>group@conference.localhost</value></field></x></query></iq>

Can someone please tell me the right request.

Thanks in advance

XEP-0313 defines three

XEP-0313 defines three filtering results: http://xmpp.org/extensions/xep-0313.html#filter

However, in ejabberd, retrieving messages from room archives requires using "withroom" instead of "with".

Since ejabberd 16.01 you can

Since ejabberd 16.01 you can do this:

<iq type="set" to="myconf@conference.mydomain.org">
   <query xmlns="urn:xmpp:mam:0">
      <set xmlns="http://jabber.org/protocol/rsm">
         <max>30</max>
         <before />
      </set>
   </query>
</iq>
Syndicate content