From b0ad52dbeba4020b361145eb0b580981878dd754 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 12 Feb 2015 15:25:57 +0000 Subject: prevents topic change popups from being displayed when subject is empty git-svn-id: http://svn.miranda-ng.org/main/trunk@12095 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/chat.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp index 0ac289edff..d6c650ec9d 100644 --- a/protocols/WhatsApp/src/chat.cpp +++ b/protocols/WhatsApp/src/chat.cpp @@ -411,14 +411,15 @@ void WhatsAppProto::onGroupNewSubject(const std::string &gjid, const std::string ptrT tszText(str2t(newSubject)); ptrT tszTextDb(getTStringA(pInfo->hContact, "Topic")); - if (mir_tstrcmp(tszText, tszTextDb)) { // notify about subject change only if differs from the stored one + if (tszTextDb != NULL) + if (mir_tstrcmp(tszText, tszTextDb) && mir_tstrcmp(tszTextDb, _T(""))) { // notify about subject change only if differs from the stored one ptrT tszUID(str2t(author)); ptrT tszNick(GetChatUserNick(author)); GCDEST gcd = { m_szModuleName, pInfo->tszJid, GC_EVENT_TOPIC }; GCEVENT gce = { sizeof(gce), &gcd }; - gce.dwFlags = 0; + gce.dwFlags = GCEF_ADDTOLOG; gce.ptszUID = tszUID; gce.ptszNick = tszNick; gce.time = ts; -- cgit v1.2.3