summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_chats.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-25 21:57:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-25 21:57:38 +0000
commitc5232695a2c245390904e8a9cd05df2e507f985c (patch)
tree313d78f55cbaa32a20b50e491e0b2b5abd0c511c /protocols/VKontakte/src/vk_chats.cpp
parentb7dc2813cd35d4a8a613b3fb6ef1a1408d86550a (diff)
VKontakte: chats don't go offline when a protocol does
git-svn-id: http://svn.miranda-ng.org/main/trunk@7895 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_chats.cpp')
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 6d12db1153..686c3f667c 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -287,6 +287,23 @@ CVkChatUser* CVkChatInfo::GetUserById(LPCTSTR ptszId)
/////////////////////////////////////////////////////////////////////////////////////////
+void CVkProto::SetChatStatus(HANDLE hContact, int iStatus)
+{
+ ptrT tszChatID(getTStringA(hContact, "ChatRoomID"));
+ if (tszChatID == NULL)
+ return;
+
+ CVkChatInfo *cc = GetChatById(tszChatID);
+ if (cc == NULL)
+ return;
+
+ 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);
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
+
TCHAR* UnEscapeChatTags(TCHAR* str_in)
{
TCHAR *s = str_in, *d = str_in;