Ejabberd MUC Server Management Request Management

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.

+6
source share
1 answer

You need to request the MUC service for the MUC archive. The MAM user service saves the message for an individual conversation only.

Also note that you are not using the latest ejabberd. To date, the latest version is 15.11. I recommend using the latest version of MAM MUC, as several clarifications to XEP-0313 have been made and added to the latest ejabberd.

Here is a sample request that sends a MAM request string to the MUC room itself:

 <iq type='set' id='juliet1' to=' tech@conference.process-one.net '> <query xmlns='urn:xmpp:mam:0' queryid='f27'> <set xmlns='http://jabber.org/protocol/rsm'> <max>10</max> </set> </query> </iq> 
+3
source

All Articles