From 2da44572c7f847664ed7568478c4dc8695909b21 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 2 Jun 2016 17:11:09 +0000 Subject: important fix for XEP-0136 implementation (thx Davis) git-svn-id: http://svn.miranda-ng.org/main/trunk@16904 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_archive.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/JabberG/src/jabber_archive.cpp') diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp index d33c37e4bb..e532302a42 100644 --- a/protocols/JabberG/src/jabber_archive.cpp +++ b/protocols/JabberG/src/jabber_archive.cpp @@ -270,16 +270,16 @@ void CJabberProto::OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*) DBEVENTINFO dbei = { sizeof(DBEVENTINFO) }; dbei.eventType = EVENTTYPE_MESSAGE; dbei.szModule = m_szModuleName; - dbei.cbBlob = (DWORD)mir_strlen(szEventText); + dbei.cbBlob = (DWORD)mir_strlen(szEventText)+1; dbei.flags = DBEF_READ + DBEF_UTF + from; dbei.pBlob = szEventText; dbei.timestamp = tmStart + _ttol(tszSecs); - if (!IsDuplicateEvent(hContact, dbei)) { + if (!IsDuplicateEvent(hContact, dbei)) db_event_add(hContact, &dbei); - if (dbei.timestamp > tmLast) - tmLast = dbei.timestamp; - } + tmStart = dbei.timestamp; + if (dbei.timestamp > tmLast) + tmLast = dbei.timestamp; } if (tmLast != 0) -- cgit v1.2.3