Open dan085 opened 4 years ago
hi
I try to retrieve chat history from XMPP. I am also done this code in my project but its not working.
please clarify this issue.
@Abishekt97 Hi , It worked for me to obtain the historial, I have to review it .. there we could talk about it and help us too
hi @dverdugo85 thanks for your replay
My code
let xmppDateString = NSDate().xmppDateTimeString var fields: [XMLElement] = [] let start = XMPPMessageArchiveManagement.field(withVar: "end", type: nil, andValue: xmppDateString) fields.append(start) let value = DDXMLElement(name: "value", stringValue: user) let child = DDXMLElement(name: "field") child.addChild(value) child.addAttribute(withName: "var", stringValue: "with") let set = XMPPResultSet(max: 20, before: "") fields.append(child) xmppMAM?.retrieveMessageArchive(at: XMPPJID(string: user), withFields: fields, with: set)
But its not working. please visit my stack overflow question and if you know please answer https://stackoverflow.com/questions/64749713/issue-on-retrieve-the-xmpp-archived-message-from-ejabberd-serverchat-history