summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-06-13 12:56:10 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-06-13 12:56:10 +0300
commit0b55f3a03f6fa86a64237ee3212a0c48bdff0b8c (patch)
tree0c3f45d0b2fb2e5f879ab6bb7765ad36040d31a3 /protocols/JabberG
parent5fb805622a3a3368ffb3de0c649074376e70256a (diff)
Jabber: fix for the first run on MAM server
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/src/jabber_mam.cpp5
1 files changed, 3 insertions, 2 deletions
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);
}