summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-04-07 14:15:39 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-04-07 14:15:39 +0000
commit59975dacfc92d80bb87a51c3acf81590d4b54ee9 (patch)
treeb76031528445a0a137d80c3394182b73512449fd /protocols/SkypeWeb
parent19a19b6c99287920f07af0b0879a1347f3b5f124 (diff)
SkypeWeb: Chats support part 1.2.
git-svn-id: http://svn.miranda-ng.org/main/trunk@12655 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r--protocols/SkypeWeb/src/skype_chats.cpp14
-rw-r--r--protocols/SkypeWeb/src/skype_proto.h1
2 files changed, 14 insertions, 1 deletions
diff --git a/protocols/SkypeWeb/src/skype_chats.cpp b/protocols/SkypeWeb/src/skype_chats.cpp
index db3f37e8f2..c69221da0d 100644
--- a/protocols/SkypeWeb/src/skype_chats.cpp
+++ b/protocols/SkypeWeb/src/skype_chats.cpp
@@ -1,8 +1,20 @@
#include "common.h"
+MCONTACT CSkypeProto::GetChat(const char *skypename)
+{
+ MCONTACT hContact = NULL;
+ for (hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
+ {
+ ptrA cSkypename(getStringA(hContact, "ChatID"));
+ if (mir_strcmpi(skypename, cSkypename) == 0)
+ break;
+ }
+ return hContact;
+}
+
MCONTACT CSkypeProto::AddChatRoom(const char *chatname)
{
- MCONTACT hContact = GetContact(chatname);
+ MCONTACT hContact = GetChat(chatname);
if (!hContact)
{
hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
diff --git a/protocols/SkypeWeb/src/skype_proto.h b/protocols/SkypeWeb/src/skype_proto.h
index fc2c55f1b3..08a54a9acc 100644
--- a/protocols/SkypeWeb/src/skype_proto.h
+++ b/protocols/SkypeWeb/src/skype_proto.h
@@ -205,6 +205,7 @@ private:
void OnGetServerHistory(const NETLIBHTTPREQUEST *response);
//chats
+ MCONTACT GetChat(const char *skypename);
MCONTACT AddChatRoom(const char *chatname);
void SetChatStatus(MCONTACT hContact, int iStatus);
//polling