summaryrefslogtreecommitdiff
path: root/protocols/VKontakte
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2019-04-13 21:52:40 +0500
committerElzorFox <elzorfox@ya.ru>2019-04-13 21:52:40 +0500
commit2cf530b43c3d0d725ad67e3210258400076553bb (patch)
tree1836ddf1164720b1b5fd4a5c74d51a38026d61b4 /protocols/VKontakte
parent260b0eaf0fa2b7d822f5c09cf0db0a1bf6b55fb7 (diff)
VKontakte: fix mark messages as read on typing if user is invisible
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp5
1 files changed, 4 insertions, 1 deletions
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"));