summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src/vk_messages.cpp')
-rw-r--r--protocols/VKontakte/src/vk_messages.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp
index f5a6726bc0..02c84f8e78 100644
--- a/protocols/VKontakte/src/vk_messages.cpp
+++ b/protocols/VKontakte/src/vk_messages.cpp
@@ -62,8 +62,16 @@ int CVkProto::SendMsg(MCONTACT hContact, int, const char *szMsg)
if (StickerId)
pReq << INT_PARAM("sticker_id", StickerId);
- else
+ else {
pReq << CHAR_PARAM("message", szMsg);
+ if (m_vkOptions.bSendVKLinksAsAttachments) {
+ CMStringA szAttachments = GetAttachmentsFromMessage(szMsg);
+ if (!szAttachments.IsEmpty()) {
+ debugLogA("CVkProto::SendMsg Attachments = %s", szAttachments);
+ pReq << CHAR_PARAM("attachment", szAttachments);
+ }
+ }
+ }
if (!bIsChat)
pReq->pUserInfo = new CVkSendMsgParam(hContact, uMsgId);