XMPP message archive function using strophe.mam.js not working

319 views Asked by At

I have function in JavaScript using Strophe.MAM.js

setTimeout(function(){
conn.mam.query("user1@localhost", {"with": "user2@locahost", onMessage: function(message) {
console.log("Message from ", $(message).find("forwarded message").attr("from"),": ", $(message).find("forwarded message body").text());
console.log($(message).text());
},
onComplete: function(response) {
console.log("Got all the messages");
}
});
}, 3000);

I see in log that server received archive query in good format, and in regular xmpp client with this generated query I get response from server. But in javascript function never got to onMessage part, only to onComplete. Do you see any error or have any hint how best to see if any useful response is got from server?

0

There are 0 answers