0

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?

Sasa Bajic
  • 113
  • 1
  • 6
  • Sasa, did you get to the solution of this by your own, I'm having the same problem. – James Nurse Feb 28 '18 at 12:06
  • I made workaround solution. Made php script on web server because I allready use for some my api functions, and basicaly with rest api I get what I need from mysql database where Jabber stores message archive... – Sasa Bajic Mar 05 '18 at 22:41

0 Answers0