diff options
author | ElzorFox <elzorfox@ya.ru> | 2017-12-18 15:35:14 +0500 |
---|---|---|
committer | ElzorFox <elzorfox@ya.ru> | 2017-12-18 15:35:29 +0500 |
commit | a1e85579f746d778c874cf083d154caa09965eea (patch) | |
tree | c5ac919e8f58b1255142a0788091cf191a97b82f /protocols/VKontakte/src/vk_pollserver.cpp | |
parent | e41d801d1c41d51c6f220ab457eaa78bbcbb51ac (diff) |
VKontakte:
add edited message support (only from vk to miranda)
update VK_API to 5.68
version bump
Diffstat (limited to 'protocols/VKontakte/src/vk_pollserver.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_pollserver.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_pollserver.cpp b/protocols/VKontakte/src/vk_pollserver.cpp index 56a9d85715..af49875118 100644 --- a/protocols/VKontakte/src/vk_pollserver.cpp +++ b/protocols/VKontakte/src/vk_pollserver.cpp @@ -78,6 +78,7 @@ void CVkProto::PollUpdates(const JSONNode &jnUpdates) debugLogA("CVkProto::PollUpdates");
CMStringA mids;
int msgid, uid, flags, platform;
+ bool bNonEdited = true;
MCONTACT hContact;
for (auto it = jnUpdates.begin(); it != jnUpdates.end(); ++it) {
@@ -106,17 +107,25 @@ void CVkProto::PollUpdates(const JSONNode &jnUpdates) }
break;
+ case VKPOLL_MSG_EDITED:
+ bNonEdited = false;
+
case VKPOLL_MSG_ADDED: // new message
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 && CheckMid(m_sendIds, msgid))
+ if (bNonEdited && (flags & VKFLAG_MSGOUTBOX && !(flags & VKFLAG_MSGCHAT) && !m_vkOptions.bSendVKLinksAsAttachments && CheckMid(m_sendIds, msgid)))
break;
if (!mids.IsEmpty())
mids.AppendChar(',');
mids.AppendFormat("%d", msgid);
+
+ if(!bNonEdited)
+ m_editedIds.insert((HANDLE)msgid);
+
+ bNonEdited = true;
break;
case VKPOLL_READ_ALL_OUT:
|