summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_chats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/SkypeWeb/src/skype_chats.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_chats.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/protocols/SkypeWeb/src/skype_chats.cpp b/protocols/SkypeWeb/src/skype_chats.cpp
index 98259480e2..32608e0228 100644
--- a/protocols/SkypeWeb/src/skype_chats.cpp
+++ b/protocols/SkypeWeb/src/skype_chats.cpp
@@ -58,10 +58,22 @@ MCONTACT CSkypeProto::AddChatRoom(const char *chatname)
void CSkypeProto::SetChatStatus(MCONTACT hContact, int iStatus)
{
ptrT tszChatID(getTStringA(hContact, "ChatID"));
+ ptrT tszNick(getTStringA(hContact, "Nick"));
if (tszChatID == NULL)
return;
+ // start chat session
+ GCSESSION gcw = {0};
+ gcw.cbSize = sizeof(gcw);
+ gcw.iType = GCW_CHATROOM;
+ gcw.pszModule = m_szModuleName;
+ gcw.ptszName = tszNick;
+ gcw.ptszID = tszChatID;
+ gcw.dwItemData = (DWORD)tszChatID;
+ CallServiceSync(MS_GC_NEWSESSION, 0, (LPARAM)&gcw);
+
GCDEST gcd = { m_szModuleName, tszChatID, GC_EVENT_CONTROL };
GCEVENT gce = { sizeof(gce), &gcd };
- CallServiceSync(MS_GC_EVENT, (iStatus == ID_STATUS_OFFLINE) ? SESSION_OFFLINE : SESSION_ONLINE, (LPARAM)&gce);
+ CallServiceSync(MS_GC_EVENT, true ? SESSION_INITDONE : WINDOW_HIDDEN, (LPARAM)&gce);
+ CallServiceSync(MS_GC_EVENT, SESSION_ONLINE, (LPARAM)&gce);
} \ No newline at end of file