diff options
author | George Hazan <george.hazan@gmail.com> | 2015-02-08 12:34:10 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-02-08 12:34:10 +0000 |
commit | 8be3a7a616f0739959fb0d4f5266973510bd4142 (patch) | |
tree | 7356f8eb154ef37c3afd21f4c6899282c42dc659 /protocols | |
parent | 8e9b164891a4074afa072b98e998ecb896a3de85 (diff) |
no need to show a popup if subject wasn't changed
git-svn-id: http://svn.miranda-ng.org/main/trunk@12054 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/WhatsApp/src/chat.cpp | 6 |
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;
|