From 30a70d349269ef4322387240718b2c9059cae691 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Mon, 9 Feb 2015 05:37:49 +0000 Subject: VKontakte: forwarded messages support version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@12058 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_thread.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'protocols/VKontakte/src/vk_thread.cpp') 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")); -- cgit v1.2.3