2

I am currently struggling to get Chat Histroy of a MUCLight Room using Strophe.js. I dont want to use the direct MUC plugin. I have used the below approaches:-

Sending the below IQ, but no return in the callback:-

<iq type='set' id='mamget1' to='coven@muclight.shakespeare.lit'>
    <query xmlns='urn:xmpp:mam:1' queryid='f27' />
</iq>

Sending the below presence but Handler not receiving anything:-

<presence from="jid" id="9855" to="roomJID" xmlns="jabber:client">
<x xmlns="http://jabber.org/protocol/muc">
<history maxstanzas="20"/>
</x>
</presence>

Please tell the correct approach, Thanks in advance

1 Answers1

1

MUC Light's history works only with MAM. MAM is not enabled by default on the server, though. Could you make sure relevant modules are enabled? I recommend using the newest MongooseIM from [1] as MAM configuration was significantly simplified there. The documentation about MAM config is here [2].

If you use MongooseIM 2.0.0 or older, please choose relevant doc version in bottom left corner on mongooseim.readthedocs.io


[1]. https://github.com/esl/MongooseIM
[2]. http://mongooseim.readthedocs.io/en/latest/modules/mod_mam

michalwski
  • 359
  • 1
  • 3
  • Hi, Thanks for the reply but i have already enabled the mod_mam, mod_muclight. I am able to confirm it by using disco#info iq sent to my XMPP server, the server returns all the implemente features there along with "urn:xmpp:mam:1" , which is the mam module for muc-light. – Himanshu Sehgal Jan 23 '17 at 10:37
  • Would you mind sharing you ejabberd.cfg file? At least `modules` section so I can see how exactly they are configured. Also, does MAM work for one-to-one messages? – michalwski Jan 24 '17 at 14:39