summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/WhatsApp/src/chat.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp
index 853bc7b164..28f0629f9b 100644
--- a/protocols/WhatsApp/src/chat.cpp
+++ b/protocols/WhatsApp/src/chat.cpp
@@ -355,14 +355,16 @@ void WhatsAppProto::onGroupNewSubject(const std::string &gjid, const std::string
if (pInfo == NULL)
return;
+ ptrT tszText(str2t(newSubject));
+ ptrT tszTextDb(getTStringA(pInfo->hContact, "Nick"));
ptrT tszUID(str2t(author));
ptrT tszNick(GetChatUserNick(author));
- ptrT tszText(str2t(newSubject));
GCDEST gcd = { m_szModuleName, pInfo->tszJid, GC_EVENT_TOPIC };
GCEVENT gce = { sizeof(gce), &gcd };
- gce.dwFlags = GCEF_ADDTOLOG;
+ if (!mir_tstrcmp(tszText, tszTextDb)) // notify about subject change only if differs from the stored one
+ gce.dwFlags = GCEF_NOTNOTIFY;
gce.ptszUID = tszUID;
gce.ptszNick = tszNick;
gce.time = ts;