summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_chats.cpp
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2015-11-12 12:54:36 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2015-11-12 12:54:36 +0000
commit1be8fd09b95b8450fdd5a1bc707b5d40219986cf (patch)
treefe91b0a2a6bbee2e5b57056c3f4479d7170c1670 /protocols/VKontakte/src/vk_chats.cpp
parentb4a3c65ee5bd561e915f05c9514f78c51b936b0c (diff)
VKontakte:
add typing notification for muc upgrade VK_API version to 5.40 add ‘caption’ for link attachments version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@15715 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_chats.cpp')
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 555d5fd06f..ae045d66fe 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -877,6 +877,38 @@ int CVkProto::OnGcMenuHook(WPARAM, LPARAM lParam)
return 0;
}
+void CVkProto::ChatContactTypingThread(void * p)
+{
+ CVKChatContactTypingParam *param = (CVKChatContactTypingParam *)p;
+ if (!p)
+ return;
+
+ int iChatId = param->m_ChatId;
+ int iUserId = param->m_UserId;
+
+ delete param;
+
+ MCONTACT hChatContact = FindChat(iChatId);
+ if (hChatContact && getBool(hChatContact, "off"))
+ return;
+
+ CVkChatInfo *cc = (CVkChatInfo*)m_chats.find((CVkChatInfo*)&iChatId);
+ if (cc == NULL)
+ return;
+
+ CVkChatUser* cu = cc->GetUserById(iUserId);
+ if (cu == NULL)
+ return;
+
+ StatusTextData st = { 0 };
+ st.cbSize = sizeof(st);
+ mir_sntprintf(st.tszText, TranslateT("%s is typing a message..."), cu->m_tszNick);
+
+ CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact, (LPARAM)&st);
+ Sleep(5500);
+ CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hChatContact);
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
static void FilterContacts(HWND hwndDlg, CVkProto *ppro)