0

I am using strophejs for querying archived messages from ejabberd. I am getting the messages but problem is that first message is not in the response.

The code is as follows

var iq = $iq({type: 'set', id: $scope.jid})
            .c('query', {xmlns:'urn:xmpp:mam:1'})
            .c('field',{'var':'with'})
            .c('value')
            .t(jid);

            conn.sendIQ(iq, archivemsg, errbak);

var archivemsg = function(iq) {
     console.log(iq);
}

What am I missing.?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • sounds weird but in the XEP-0313 namespace to be used is urn:xmpp:mam:2. Try changing to this and see if it works. Refer https://xmpp.org/extensions/xep-0313.html – divsingh Dec 17 '17 at 17:58
  • hi , thanks for the reply. I tried changing to urn:xmpp:mam:2 but iam getting the error message "mithun@mjdev022No module is handling this query" – Mithun Raj Dec 19 '17 at 05:13

0 Answers0