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.?