From 53aab07f1ee1dc3fe8c48dbe95a434079013f260 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 15 Jan 2020 19:23:16 +0300 Subject: Discord: if message text is empty, there's no need to add it --- protocols/Discord/src/dispatch.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'protocols/Discord') diff --git a/protocols/Discord/src/dispatch.cpp b/protocols/Discord/src/dispatch.cpp index dccb94995e..3766361a4b 100644 --- a/protocols/Discord/src/dispatch.cpp +++ b/protocols/Discord/src/dispatch.cpp @@ -339,9 +339,11 @@ void CDiscordProto::OnCommandMessage(const JSONNode &pRoot, bool bIsNew) } else { CMStringW wszText = PrepareMessageText(pRoot); - bool bOurMessage = userId == m_ownId; + if (wszText.IsEmpty()) + return; // old message? try to restore it from database + bool bOurMessage = userId == m_ownId; if (!bIsNew) { MEVENT hOldEvent = db_event_getById(m_szModuleName, szMsgId); if (hOldEvent) { -- cgit v1.2.3