diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-02-09 05:37:49 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-02-09 05:37:49 +0000 |
commit | 30a70d349269ef4322387240718b2c9059cae691 (patch) | |
tree | 9204c4b94c10c8e2a2df158bbc32b85423cc2f0f /protocols/VKontakte/src/vk_thread.cpp | |
parent | cc9402b1daabb0a27065e5eb704948cc2f74f7df (diff) |
VKontakte:
forwarded messages support
version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@12058 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index a34e83d07e..3b931859d7 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -637,10 +637,22 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe int isOut = json_as_int(json_get(pMsg, "out"));
int isRead = json_as_int(json_get(pMsg, "read_state"));
int uid = json_as_int(json_get(pMsg, "user_id"));
- JSONNODE *pAttachments = json_get(pMsg, "attachments");
- if (pAttachments != NULL)
- ptszBody = mir_tstrdup(CMString(ptszBody) + GetAttachmentDescr(pAttachments, m_iBBCForAttachments));
+ JSONNODE *pFwdMessages = json_get(pMsg, "fwd_messages");
+ if (pFwdMessages != NULL){
+ CMString tszFwdMessages = GetFwdMessages(pFwdMessages, m_iBBCForAttachments);
+ if (!IsEmpty(ptszBody))
+ tszFwdMessages = _T("\n") + tszFwdMessages;
+ ptszBody = mir_tstrdup(CMString(ptszBody) + tszFwdMessages);
+ }
+
+ JSONNODE *pAttachments = json_get(pMsg, "attachments");
+ if (pAttachments != NULL){
+ CMString tszAttachmentDescr = GetAttachmentDescr(pAttachments, m_iBBCForAttachments);
+ if (!IsEmpty(ptszBody))
+ tszAttachmentDescr = _T("\n") + tszAttachmentDescr;
+ ptszBody = mir_tstrdup(CMString(ptszBody) + tszAttachmentDescr);
+ }
MCONTACT hContact = NULL;
int chat_id = json_as_int(json_get(pMsg, "chat_id"));
|