diff options
author | George Hazan <ghazan@miranda.im> | 2020-01-15 19:23:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-01-15 19:23:16 +0300 |
commit | 53aab07f1ee1dc3fe8c48dbe95a434079013f260 (patch) | |
tree | ee254c130e9aca6c291c9abc33f8ca6db6d5e373 /protocols/Discord/src | |
parent | 262f12cd97d52a5a78f0d8de1efd79127901901a (diff) |
Discord: if message text is empty, there's no need to add it
Diffstat (limited to 'protocols/Discord/src')
-rw-r--r-- | protocols/Discord/src/dispatch.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |