From ef4313756d5612160f6fcb925f88d92660521d04 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 12 Jul 2014 09:57:37 +0000 Subject: VKontakte: support for wall posts (patch by Ganster41) git-svn-id: http://svn.miranda-ng.org/main/trunk@9767 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_thread.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'protocols') diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index d92539b22b..ccb2c5e2fb 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -683,6 +683,15 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments) res.AppendFormat(_T("%s: (%s) - %s"), TranslateT("Document"), ptszTitle, ptszUrl); } + else if (!lstrcmp(ptszType, _T("wall"))) { + JSONNODE *pWall = json_get(pAttach, "wall"); + if (pWall == NULL) continue; + + ptrT ptszText(json_as_string(json_get(pWall, "text"))); + int id = json_as_int(json_get(pWall, "id")); + int fromID = json_as_int(json_get(pWall, "from_id")); + res.AppendFormat(_T("%s: %s - http://vk.com/wall%d_%d"), TranslateT("Wall post"), ptszText, fromID, id); + } else res.AppendFormat(TranslateT("Unsupported or unknown attachment type: %s"), ptszType); res.AppendChar('\n'); -- cgit v1.2.3