I use ejabberd 15.09 and enable archive management for each MUC in the server configuration, as shown below:
mod_mam: default: always mod_muc: ## host: " conference.@HOST @" access: muc access_create: muc_create access_persistent: muc_create access_admin: muc_admin default_room_options: mam: true persistent: true public: true
Also, a check in the admin panel for Ejabberd shows that messages are archived as the number of items in the archive table increases after each message is sent to the MUC. This verifies that archiving is enabled for the session.
To request a server to archive messages from the MUC, I send this iq packet:
<iq type='set' id='testid1'> <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> testmyroomnow@conference.ip /</value> </field> </x> </query> </iq>
The response received from the server does not contain messages.
<message from=' user@ip ' to=' user@ip /Gajim'> <fin xmlns='urn:xmpp:mam:0' complete='true'> <set xmlns='http://jabber.org/protocol/rsm'> <count>0</count> </set> </fin> </message>
This MUC already contains some messages, but queries like the one above do not return any message. The xml stanza format seems to be incorrect. Conference send JID format is incorrect or something else.
Not sure what to do, as I already use the latest version of Ejabberd, which shows support for the MUC archive. The other thing I'm doing here, I have no idea how to request a MUC archive from an ejabberd server.
source share