summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/misc.cpp
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2015-08-12 06:28:26 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2015-08-12 06:28:26 +0000
commit2eb921fdbae7be508cdd3e20c67760384d84348e (patch)
treee3afd9d520b9f8bfd3bb31a5800cf93d613c5514 /protocols/VKontakte/src/misc.cpp
parentc889a87ca723981a7105b2970da9d33a11b96e9d (diff)
VKontakte:
update vk api version to 5.37 minor change for forward message formating code cleaning version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@14921 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r--protocols/VKontakte/src/misc.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 9952a2e950..e9ef416b76 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -1058,7 +1058,7 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
res.AppendFormat(_T("%s"), tszLink);
if (m_iIMGBBCSupport && iBBC != bbcNo)
- res += SetBBCString(tszLink, iBBC, vkbbcImg);
+ res += SetBBCString(tszLink, iBBC, vkbbcImg);
}
}
else if (tszType == _T("link")) {
@@ -1069,13 +1069,13 @@ CMString CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
CMString tszUrl(jnLink["url"].as_mstring());
CMString tszTitle(jnLink["title"].as_mstring());
CMString tszDescription(jnLink["description"].as_mstring());
- CMString tszImage(jnLink["image_src"].as_mstring());
res.AppendFormat(_T("%s: %s"),
SetBBCString(TranslateT("Link"), iBBC, vkbbcB),
SetBBCString(tszTitle, iBBC, vkbbcUrl, tszUrl));
- if (!tszImage.IsEmpty())
- res.AppendFormat(_T("\n\t%s: %s"), TranslateT("Image"), SetBBCString(tszImage, m_iIMGBBCSupport ? iBBC : bbcNo, vkbbcImg));
+
+ if (!jnLink["photo"].isnull())
+ res.AppendFormat(_T("\n\t%s"), GetVkPhotoItem(jnLink["photo"], iBBC));
if (!tszDescription.IsEmpty())
res.AppendFormat(_T("\n\t%s"), tszDescription);
@@ -1158,9 +1158,11 @@ CMString CVkProto::GetFwdMessages(const JSONNode &jnMessages, BBCSupport iBBC)
tszBody.Replace(_T("\n"), _T("\n\t"));
CMString tszMes;
- tszMes.AppendFormat(_T("%s %s %s %s:\n%s"),
+ TCHAR tcSplit = m_bSplitFormatFwdMsg ? '\n' : ' ';
+ tszMes.AppendFormat(_T("%s %s%c%s %s:\n\n%s\n"),
SetBBCString(TranslateT("Message from"), iBBC, vkbbcB),
SetBBCString(tszNick, iBBC, vkbbcUrl, tszUrl),
+ tcSplit,
SetBBCString(TranslateT("at"), iBBC, vkbbcB),
ttime,
tszBody);