how to get chat archive with strophe?
Closed this issue · 5 comments
I want get two people chat archive ,how can I do it with strophe.min.js?
I have run the monitoring plugin and much message in table ofMessageArchive
Looks like you need this: https://github.com/strophe/strophejs-plugin-mam
Looks like you need this: https://github.com/strophe/strophejs-plugin-mam
Yes,it is what I want . I had load chat archive success ,Thank you very much .
but ,I dont konw how to filter archive,I just can load all the message from one body with other body.
I want one page by one page ,20 rows a page to load
I solved it ,thank you
js code like this
console.log("开始获取");
connection.mam.query("jersey@192.168.2.222", {
"with": "maobiwen1@192.168.2.222",
"start": "2021-03-24T00:00:01Z",
"end": "2021-03-24T23:59:59Z",
onMessage: function (message) {
console.log("Message from ", $(message).find("forwarded message").attr("from"),
": ", $(message).find("forwarded message body").text());
return true;
},
onComplete: function (response) {
console.log("Got all the messages");
}
});
xml like this
urn:xmpp:mam:2 maobiwen1@192.168.2.222 2021-03-24T00:00:01Z 2021-03-24T23:59:59ZLooks like you need this: https://github.com/strophe/strophejs-plugin-mam
I think I have got new problem。
I want load chat archive page by page ,20 rows one page ,but when I use 'after-id' field,the server give me an error response ,error like this :Unsupported field(s): after-id
why?
my request xml is :
This issue tracker is intended to be used to track feature requests and bugs in the software. It is not intended as a way to ask for help. Please do not create issues if you're looking for advise or help.
You can seek help from the Ignite Realtime Community in various ways. Typically, asking questions in https://discourse.igniterealtime.org/ is a good start.