summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/VKontakte/src/misc.cpp4
-rw-r--r--protocols/VKontakte/src/stdafx.h1
-rw-r--r--protocols/VKontakte/src/vk_pollserver.cpp7
3 files changed, 9 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 5507ca4f90..b5c3238027 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -701,7 +701,7 @@ void CVkProto::ContactTypingThread(void *p)
Sleep(5500);
CallService(MS_PROTO_CONTACTISTYPING, hContact);
- if (!ServiceExists("MessageState/DummyService")) {
+ if (!ServiceExists(MS_MESSAGESTATE_UPDATE)) {
Sleep(1500);
SetSrmmReadStatus(hContact);
}
@@ -712,7 +712,7 @@ int CVkProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam)
debugLogA("CVkProto::OnProcessSrmmEvent");
MessageWindowEventData *event = (MessageWindowEventData *)lParam;
- if (event->uType == MSG_WINDOW_EVT_OPENING && !ServiceExists("MessageState/DummyService"))
+ if (event->uType == MSG_WINDOW_EVT_OPENING && !ServiceExists(MS_MESSAGESTATE_UPDATE))
SetSrmmReadStatus(event->hContact);
return 0;
diff --git a/protocols/VKontakte/src/stdafx.h b/protocols/VKontakte/src/stdafx.h
index 0db91b86dc..8aaa81e389 100644
--- a/protocols/VKontakte/src/stdafx.h
+++ b/protocols/VKontakte/src/stdafx.h
@@ -58,6 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <m_utils.h>
#include <m_proto_listeningto.h>
+#include <m_messagestate.h>
#include <m_popup.h>
#include <m_folders.h>
diff --git a/protocols/VKontakte/src/vk_pollserver.cpp b/protocols/VKontakte/src/vk_pollserver.cpp
index 4bcf807a4f..f835fbc510 100644
--- a/protocols/VKontakte/src/vk_pollserver.cpp
+++ b/protocols/VKontakte/src/vk_pollserver.cpp
@@ -87,7 +87,12 @@ void CVkProto::PollUpdates(const JSONNode &jnUpdates)
if (hContact != NULL && (flags & VKFLAG_MSGUNREAD) && !CheckMid(m_incIds, msgid)) {
setDword(hContact, "LastMsgReadTime", time(NULL));
- if (!ServiceExists("MessageState/DummyService"))
+ if (ServiceExists(MS_MESSAGESTATE_UPDATE))
+ {
+ MessageReadData data(time(NULL), MRD_TYPE_READTIME);
+ CallService(MS_MESSAGESTATE_UPDATE, hContact, (LPARAM)&data);
+ }
+ else
SetSrmmReadStatus(hContact);
if (m_bUserForceOnlineOnActivity)
SetInvisible(hContact);