diff options
author | George Hazan <george.hazan@gmail.com> | 2015-02-11 21:24:46 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-02-11 21:24:46 +0000 |
commit | c9ad04d06a3dcbb59a79e4b9af07b5a57417025c (patch) | |
tree | f08efa6e99905bb26b92638aee769a92f1bc4f98 /protocols/WhatsApp | |
parent | 501db5b2a370bcf385abea1179cb96776259b0c1 (diff) |
fix for converting old wassup chats into the new ones
git-svn-id: http://svn.miranda-ng.org/main/trunk@12090 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp')
-rw-r--r-- | protocols/WhatsApp/src/chat.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp index c3c4fbb0f4..0ac289edff 100644 --- a/protocols/WhatsApp/src/chat.cpp +++ b/protocols/WhatsApp/src/chat.cpp @@ -294,6 +294,13 @@ WAChatInfo* WhatsAppProto::InitChat(const std::string &jid, const std::string &n WAChatInfo *pInfo = new WAChatInfo(ptszJid, ptszNick);
m_chats[jid] = pInfo;
+ pInfo->hContact = ContactIDToHContact(jid);
+ if (!isChatRoom(pInfo->hContact)) {
+ delSetting(pInfo->hContact, "ID");
+ setByte(pInfo->hContact, "ChatRoom", 1);
+ setString(pInfo->hContact, "ChatRoomID", jid.c_str());
+ }
+
GCSESSION gcw = { sizeof(GCSESSION) };
gcw.iType = GCW_CHATROOM;
gcw.pszModule = m_szModuleName;
@@ -301,8 +308,6 @@ WAChatInfo* WhatsAppProto::InitChat(const std::string &jid, const std::string &n gcw.ptszID = ptszJid;
CallServiceSync(MS_GC_NEWSESSION, NULL, (LPARAM)&gcw);
- pInfo->hContact = ContactIDToHContact(jid);
-
GCDEST gcd = { m_szModuleName, ptszJid, GC_EVENT_ADDGROUP };
GCEVENT gce = { sizeof(gce), &gcd };
for (int i = SIZEOF(sttStatuses) - 1; i >= 0; i--) {
|