From 8be3a7a616f0739959fb0d4f5266973510bd4142 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 8 Feb 2015 12:34:10 +0000 Subject: 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 --- protocols/WhatsApp/src/chat.cpp | 6 ++++-- 1 file 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; -- cgit v1.2.3