From 2cf530b43c3d0d725ad67e3210258400076553bb Mon Sep 17 00:00:00 2001 From: ElzorFox Date: Sat, 13 Apr 2019 21:52:40 +0500 Subject: VKontakte: fix mark messages as read on typing if user is invisible --- protocols/VKontakte/src/vk_proto.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'protocols/VKontakte/src') diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index a15749e750..8faabfcd1e 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -613,7 +613,7 @@ int CVkProto::UserIsTyping(MCONTACT hContact, int type) debugLogA("CVkProto::UserIsTyping"); if (PROTOTYPE_SELFTYPING_ON == type) { LONG userID = getDword(hContact, "ID", VK_INVALID_USER); - if (userID == VK_INVALID_USER || !IsOnline() || userID == VK_FEED_USER || m_iStatus == ID_STATUS_INVISIBLE) + if (userID == VK_INVALID_USER || !IsOnline() || userID == VK_FEED_USER) return 1; if (!IsEmpty(ptrW(db_get_wsa(hContact, m_szModuleName, "Deactivated")))) @@ -622,6 +622,9 @@ int CVkProto::UserIsTyping(MCONTACT hContact, int type) if (m_vkOptions.iMarkMessageReadOn == MarkMsgReadOn::markOnTyping) MarkMessagesRead(hContact); + if (m_iStatus == ID_STATUS_INVISIBLE) + return 1; + Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.setActivity.json", true, &CVkProto::OnReceiveSmth, AsyncHttpRequest::rpLow) << INT_PARAM("user_id", userID) << CHAR_PARAM("type", "typing")); -- cgit v1.2.3