summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-02-09 14:50:59 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-02-09 14:50:59 +0000
commitd34c8dc9de79fe83cfd0b53d845f8596676442f7 (patch)
treecdd92abb3a23cac5f3eeb112a1c7adb1c171ec62
parent753572a30e7eb2b44b3937f3854ecfe172833a62 (diff)
fix for the default group's name
git-svn-id: http://svn.miranda-ng.org/main/trunk@12065 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/WhatsApp/src/contacts.cpp2
-rw-r--r--protocols/WhatsApp/src/proto.cpp7
-rw-r--r--protocols/WhatsApp/src/proto.h2
3 files changed, 6 insertions, 5 deletions
diff --git a/protocols/WhatsApp/src/contacts.cpp b/protocols/WhatsApp/src/contacts.cpp
index 8a091af1fa..26e1050d9f 100644
--- a/protocols/WhatsApp/src/contacts.cpp
+++ b/protocols/WhatsApp/src/contacts.cpp
@@ -42,7 +42,7 @@ MCONTACT WhatsAppProto::AddToContactList(const std::string &jid, const char *new
setString(hContact, "MirVer", "WhatsApp");
db_unset(hContact, "CList", "MyHandle");
db_set_b(hContact, "CList", "NotOnList", 1);
- db_set_ts(hContact, "CList", "Group", m_defaultGroup);
+ db_set_ts(hContact, "CList", "Group", m_tszDefaultGroup);
if (new_name != NULL)
db_set_utf(hContact, m_szModuleName, WHATSAPP_KEY_NICK, new_name);
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp
index c202503703..ba47afa2e6 100644
--- a/protocols/WhatsApp/src/proto.cpp
+++ b/protocols/WhatsApp/src/proto.cpp
@@ -14,7 +14,7 @@ struct SearchParam
WhatsAppProto::WhatsAppProto(const char* proto_name, const TCHAR* username) :
PROTO<WhatsAppProto>(proto_name, username),
- m_defaultGroup(getTStringA(WHATSAPP_KEY_DEF_GROUP))
+ m_tszDefaultGroup(getTStringA(WHATSAPP_KEY_DEF_GROUP))
{
update_loop_lock_ = CreateEvent(NULL, false, false, NULL);
@@ -50,8 +50,9 @@ WhatsAppProto::WhatsAppProto(const char* proto_name, const TCHAR* username) :
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
CreateDirectoryTreeT(m_tszAvatarFolder.c_str());
- if (m_defaultGroup == NULL)
- m_defaultGroup = mir_tstrdup(_T("WhatsApp"));
+ if (m_tszDefaultGroup == NULL)
+ m_tszDefaultGroup = mir_tstrdup(_T("WhatsApp"));
+ Clist_CreateGroup(0, m_tszDefaultGroup);
SetAllContactStatuses(ID_STATUS_OFFLINE, true);
}
diff --git a/protocols/WhatsApp/src/proto.h b/protocols/WhatsApp/src/proto.h
index 4585d9e48f..a74ed810a3 100644
--- a/protocols/WhatsApp/src/proto.h
+++ b/protocols/WhatsApp/src/proto.h
@@ -175,7 +175,7 @@ private:
WAConnection *m_pConnection;
Mutex connMutex;
time_t m_tLastWriteTime;
- ptrT m_defaultGroup;
+ ptrT m_tszDefaultGroup;
std::vector<unsigned char> m_Challenge;
std::string m_szPhoneNumber;