Open Abishekt417 opened 4 years ago
func getArchieveMessages(forUser user:String){ var fields = [DDXMLElement]() fields.append(XMPPMessageArchiveManagement.field(withVar: "start", type: "text-single", andValue: Date().addingTimeInterval(-(2*24*60*60)).toString(format: .messageRTetriveFormat))) xmppMAM.resultAutomaticPagingPageSize = 150 xmppMAM.retrieveMessageArchive(at: XMPPJID(string: user), withFields: fields, with: nil) // xmppMAM.retrieveMessageArchive(at: nil, withFields: [child], with: set) }
I write code like this for retrieve history. After call this method
we received call back on delegate
func xmppMessageArchiveManagement(_ xmppMessageArchiveManagement: XMPPMessageArchiveManagement, didFinishReceivingMessagesWith resultSet: XMPPResultSet) { print("didFinishReceivingMessagesWith", resultSet) }
I write code like this for retrieve history. After call this method
we received call back on delegate