summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp')
-rw-r--r--protocols/WhatsApp/src/chat.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp
index 8c5d83c7bb..2bd10dc74f 100644
--- a/protocols/WhatsApp/src/chat.cpp
+++ b/protocols/WhatsApp/src/chat.cpp
@@ -322,8 +322,7 @@ WAChatInfo* WhatsAppProto::InitChat(const std::string &jid, const std::string &n
gcw.ptszID = ptszJid;
CallServiceSync(MS_GC_NEWSESSION, NULL, (LPARAM)&gcw);
- if (hOldContact == NULL)
- pInfo->hContact = ContactIDToHContact(jid);
+ pInfo->hContact = (hOldContact != NULL) ? hOldContact : ContactIDToHContact(jid);
GCDEST gcd = { m_szModuleName, ptszJid, GC_EVENT_ADDGROUP };
GCEVENT gce = { sizeof(gce), &gcd };