diff options
author | ElzorFox <elzorfox@ya.ru> | 2018-09-22 15:04:18 +0500 |
---|---|---|
committer | ElzorFox <elzorfox@ya.ru> | 2018-09-22 15:04:18 +0500 |
commit | dafbc9f884d3c696ecaadb9e32b90e831b04427a (patch) | |
tree | 88aef6eca36b44558bcc5031d14694fdb5ccce0a /protocols/VKontakte/src/vk_pollserver.cpp | |
parent | dfc40eb5c9d357c7cd5e8cb0e9e6f2173b4935ef (diff) |
VKontakte: more correct protection from duplicate messages
Diffstat (limited to 'protocols/VKontakte/src/vk_pollserver.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_pollserver.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_pollserver.cpp b/protocols/VKontakte/src/vk_pollserver.cpp index b747e2055c..1f95f2954a 100644 --- a/protocols/VKontakte/src/vk_pollserver.cpp +++ b/protocols/VKontakte/src/vk_pollserver.cpp @@ -91,7 +91,7 @@ void CVkProto::PollUpdates(const JSONNode &jnUpdates) uid = jnChild[3].as_int();
hContact = FindUser(uid);
- if (hContact != 0 && (flags & VKFLAG_MSGUNREAD) && !IsMessageExist(msgid)) {
+ if (hContact != 0 && (flags & VKFLAG_MSGUNREAD) && !IsMessageExist(msgid, vkIN)) {
setDword(hContact, "LastMsgReadTime", time(0));
if (ServiceExists(MS_MESSAGESTATE_UPDATE)) {
MessageReadData data(time(0), MRD_TYPE_READTIME);
@@ -117,7 +117,7 @@ void CVkProto::PollUpdates(const JSONNode &jnUpdates) msgid = jnChild[1].as_int();
// skip outgoing messages sent from a client
flags = jnChild[2].as_int();
- if (flags & VKFLAG_MSGOUTBOX && !(flags & VKFLAG_MSGCHAT) && !m_vkOptions.bSendVKLinksAsAttachments && IsMessageExist(msgid))
+ if (flags & VKFLAG_MSGOUTBOX && !(flags & VKFLAG_MSGCHAT) && !m_vkOptions.bSendVKLinksAsAttachments && IsMessageExist(msgid, vkOUT))
break;
if (!mids.IsEmpty())
|