summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/contacts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp/src/contacts.cpp')
-rw-r--r--protocols/WhatsApp/src/contacts.cpp12
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(""));
}