From 0b55f3a03f6fa86a64237ee3212a0c48bdff0b8c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 13 Jun 2020 12:56:10 +0300 Subject: Jabber: fix for the first run on MAM server --- protocols/JabberG/src/jabber_mam.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'protocols/JabberG') diff --git a/protocols/JabberG/src/jabber_mam.cpp b/protocols/JabberG/src/jabber_mam.cpp index 41a3482119..0e29619eed 100644 --- a/protocols/JabberG/src/jabber_mam.cpp +++ b/protocols/JabberG/src/jabber_mam.cpp @@ -68,11 +68,12 @@ void CJabberProto::MamSetMode(int iNewMode) void CJabberProto::MamRetrieveMissingMessages() { CMStringA szLastId = getMStringA("LastMamId"); + if (szLastId.IsEmpty()) + return; XmlNodeIq iq("set", SerialNext()); auto *set = iq << XCHILDNS("query", JABBER_FEAT_MAM) << XCHILDNS("set", "http://jabber.org/protocol/rsm"); set << XCHILD("max", "100"); - if (!szLastId.IsEmpty()) - set << XCHILD("after", szLastId); + set << XCHILD("after", szLastId); m_ThreadInfo->send(iq); } -- cgit v1.2.3