From 326df8a13d865eccf3c3290c785ed92082574110 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Mon, 9 Feb 2015 07:31:50 +0000 Subject: VKontakte: add subattachments support for attachment type=wall git-svn-id: http://svn.miranda-ng.org/main/trunk@12060 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/misc.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'protocols/VKontakte') diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 2fd7189502..e8b5682b29 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -991,6 +991,14 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments, BBCSupport iBBC) res.AppendFormat(_T("%s: %s"), SetBBCString(TranslateT("Wall post"), iBBC, vkbbcUrl, tszUrl.GetBuffer()).GetBuffer(), ptszText ? ptszText : _T(" ")); + + JSONNODE *pSubAttachments = json_get(pWall, "attachments"); + if (pSubAttachments != NULL) { + debugLogA("CVkProto::GetAttachmentDescr SubAttachments"); + CMString tszAttachmentDescr = GetAttachmentDescr(pSubAttachments, m_iBBCForAttachments); + tszAttachmentDescr.Replace(_T("\n"), _T("\n\t")); + res += _T("\n\t") + tszAttachmentDescr; + } } else if (!mir_tstrcmp(ptszType, _T("sticker"))) { JSONNODE *pSticker = json_get(pAttach, "sticker"); @@ -1039,7 +1047,8 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments, BBCSupport iBBC) if (ptszDescription) res.AppendFormat(_T("\n\t%s"), ptszDescription); } - else res.AppendFormat(TranslateT("Unsupported or unknown attachment type: %s"), SetBBCString(ptszType, iBBC, vkbbcB).GetBuffer()); + else + res.AppendFormat(TranslateT("Unsupported or unknown attachment type: %s"), SetBBCString(ptszType, iBBC, vkbbcB).GetBuffer()); res.AppendChar('\n'); } -- cgit v1.2.3