diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-02-09 07:31:50 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-02-09 07:31:50 +0000 |
commit | 326df8a13d865eccf3c3290c785ed92082574110 (patch) | |
tree | 61810d2dbd352ef294436a87e05453f8347c477e /protocols/VKontakte | |
parent | 1d0967fa1b46f7d362ce2529d041ae9224c6515b (diff) |
VKontakte: add subattachments support for attachment type=wall
git-svn-id: http://svn.miranda-ng.org/main/trunk@12060 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
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');
}
|