diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-07-15 08:38:42 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2016-07-15 08:38:42 +0000 |
commit | 894863f12475eccf99c943aa96d9c27e9a8b6303 (patch) | |
tree | eef96092e56f9b001ddf3dd015d0d318c62edb75 /protocols/VKontakte/src/vk_messages.cpp | |
parent | 9fa7784dc51d3f1bee7a7370450efaeebc5b5d31 (diff) |
VKontakte:
add option for loading sent attachments
version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@17094 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_messages.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_messages.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp index 02c84f8e78..a9a7f222e4 100644 --- a/protocols/VKontakte/src/vk_messages.cpp +++ b/protocols/VKontakte/src/vk_messages.cpp @@ -256,11 +256,12 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe tszBody += tszFwdMessages;
}
+ CMString tszAttachmentDescr;
const JSONNode &jnAttachments = jnMsg["attachments"];
if (jnAttachments) {
- CMString tszAttachmentDescr = GetAttachmentDescr(jnAttachments, m_vkOptions.BBCForAttachments());
+ tszAttachmentDescr = GetAttachmentDescr(jnAttachments, m_vkOptions.BBCForAttachments());
if (!tszBody.IsEmpty())
- tszAttachmentDescr = _T("\n") + tszAttachmentDescr;
+ tszBody += _T("\n");
tszBody += tszAttachmentDescr;
}
@@ -319,6 +320,12 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe if (!isOut)
m_incIds.insert((HANDLE)mid);
}
+ else if (m_vkOptions.bLoadSentAttachments && !tszAttachmentDescr.IsEmpty() && !isOut) {
+ T2Utf pszAttach(tszAttachmentDescr);
+ recv.timestamp = time(NULL); // only local time
+ recv.szMessage = pszAttach;
+ ProtoChainRecvMsg(hContact, &recv);
+ }
}
if (!mids.IsEmpty())
|