diff options
author | George Hazan <george.hazan@gmail.com> | 2015-02-09 20:32:09 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-02-09 20:32:09 +0000 |
commit | 822419030c568b40e8a7921232f74a1ecfd749ce (patch) | |
tree | 56034fa65d2dbd33386f410116ece062523ff2c0 /protocols/WhatsApp/src/contacts.cpp | |
parent | 047ec3257cc6e15d8e611a8c8c411894c5cced82 (diff) |
small fix for the subject changing logic
git-svn-id: http://svn.miranda-ng.org/main/trunk@12074 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/contacts.cpp')
-rw-r--r-- | protocols/WhatsApp/src/contacts.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/protocols/WhatsApp/src/contacts.cpp b/protocols/WhatsApp/src/contacts.cpp index 26e1050d9f..8ee4c0318c 100644 --- a/protocols/WhatsApp/src/contacts.cpp +++ b/protocols/WhatsApp/src/contacts.cpp @@ -81,16 +81,10 @@ MCONTACT WhatsAppProto::ContactIDToHContact(const std::string &phoneNumber) void WhatsAppProto::SetAllContactStatuses(int status, bool reset_client)
{
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if (isChatRoom(hContact))
- continue;
-
if (reset_client) {
- DBVARIANT dbv;
- if (!getTString(hContact, "MirVer", &dbv)) {
- if (_tcscmp(dbv.ptszVal, _T("WhatsApp")))
- setTString(hContact, "MirVer", _T("WhatsApp"));
- db_free(&dbv);
- }
+ ptrT tszMirVer(getTStringA(hContact, "MirVer"));
+ if (mir_tstrcmp(tszMirVer, _T("WhatsApp")))
+ setTString(hContact, "MirVer", _T("WhatsApp"));
db_set_ws(hContact, "CList", "StatusMsg", _T(""));
}
|