diff options
author | George Hazan <george.hazan@gmail.com> | 2014-07-12 09:57:37 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-07-12 09:57:37 +0000 |
commit | ef4313756d5612160f6fcb925f88d92660521d04 (patch) | |
tree | a0fb8beeff13cfb5dd4b77fc1a766d58e9af2774 /protocols | |
parent | 78d543e00b33bffc196d07622db74e64d5feed7e (diff) |
VKontakte: support for wall posts (patch by Ganster41)
git-svn-id: http://svn.miranda-ng.org/main/trunk@9767 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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');
|