summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElzorFox <elzorfox@ya.ru>2017-01-31 14:09:02 +0500
committerElzorFox <elzorfox@ya.ru>2017-01-31 14:09:02 +0500
commit5f9ab0cf3c13bd2a0cae62bd9c5427ad302ac540 (patch)
tree5c81656ffa384c9266365f3b6541b8c68d2212a3
parent02b8906821e7260ad343b14715ef0d1cdd500bb8 (diff)
VKontakte: fix link for attachments if title is empty
-rw-r--r--protocols/VKontakte/src/misc.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp
index 7f81cdf53e..584929f28d 100644
--- a/protocols/VKontakte/src/misc.cpp
+++ b/protocols/VKontakte/src/misc.cpp
@@ -1087,7 +1087,7 @@ CMStringW CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
CMStringW wszUrl(FORMAT, L"https://vk.com/video%d_%d", ownerID, vid);
res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Video"), iBBC, vkbbcB),
- SetBBCString(wszTitle, iBBC, vkbbcUrl, wszUrl));
+ SetBBCString(wszTitle.IsEmpty() ? TranslateT("Link") : wszTitle, iBBC, vkbbcUrl, wszUrl));
}
else if (wszType == L"doc") {
const JSONNode &jnDoc = jnAttach["doc"];
@@ -1098,7 +1098,7 @@ CMStringW CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
CMStringW wszUrl(jnDoc["url"].as_mstring());
res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Document"), iBBC, vkbbcB),
- SetBBCString(wszTitle, iBBC, vkbbcUrl, wszUrl));
+ SetBBCString(wszTitle.IsEmpty() ? TranslateT("Link") : wszTitle, iBBC, vkbbcUrl, wszUrl));
}
else if (wszType == L"wall") {
const JSONNode &jnWall = jnAttach["wall"];
@@ -1180,7 +1180,7 @@ CMStringW CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Link"), iBBC, vkbbcB),
- SetBBCString(wszTitle, iBBC, vkbbcUrl, wszUrl));
+ SetBBCString(wszTitle.IsEmpty() ? TranslateT("Link") : wszTitle, iBBC, vkbbcUrl, wszUrl));
if (!wszCaption.IsEmpty())
res.AppendFormat(L"\n\t%s", SetBBCString(wszCaption, iBBC, vkbbcI));
@@ -1207,7 +1207,7 @@ CMStringW CVkProto::GetAttachmentDescr(const JSONNode &jnAttachments, BBCSupport
res.AppendFormat(L"%s: %s",
SetBBCString(TranslateT("Product"), iBBC, vkbbcB),
- SetBBCString(wszTitle, iBBC, vkbbcUrl, wszUrl));
+ SetBBCString(wszTitle.IsEmpty() ? TranslateT("Link") : wszTitle, iBBC, vkbbcUrl, wszUrl));
if (!wszPhoto.IsEmpty())
res.AppendFormat(L"\n\t%s: %s",