diff options
Diffstat (limited to 'protocols/SkypeWeb')
-rw-r--r-- | protocols/SkypeWeb/src/skype_chats.cpp | 14 | ||||
-rw-r--r-- | protocols/SkypeWeb/src/skype_proto.h | 1 |
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
|