From d7382326906b9f3bdd66704dd1b41f9299c1daa6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 20 Jul 2013 13:23:20 +0000 Subject: protocol helper for detecting chats: isChatRoom git-svn-id: http://svn.miranda-ng.org/main/trunk@5428 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/contacts.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'protocols/WhatsApp') diff --git a/protocols/WhatsApp/src/contacts.cpp b/protocols/WhatsApp/src/contacts.cpp index 2cdc0effc9..8ed8b0e918 100644 --- a/protocols/WhatsApp/src/contacts.cpp +++ b/protocols/WhatsApp/src/contacts.cpp @@ -8,7 +8,7 @@ bool WhatsAppProto::IsMyContact(HANDLE hContact, bool include_chat) if( include_chat ) return true; - return getByte(hContact, "ChatRoom", 0) == 0; + return !isChatRoom(hContact); } return false; @@ -131,7 +131,7 @@ HANDLE WhatsAppProto::ContactIDToHContact(const std::string& phoneNumber) if(!IsMyContact(hContact, true)) continue; - const char* id = getByte(hContact, "ChatRoom", 0) > 0 ? idForChat : idForContact; + const char* id = isChatRoom(hContact) ? idForChat : idForContact; DBVARIANT dbv; if( !getString(hContact, id, &dbv)) -- cgit v1.2.3