summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2015-07-10 12:09:55 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2015-07-10 12:09:55 +0000
commit18170fc2601f90dd8d1b39feae78fcafeb978332 (patch)
tree998ea0a8d930aec73c6fdd8bc68d916fc534d2ed /protocols
parent92d9e370f525f0d8ce80e1168f946294c7916979 (diff)
VKontakte: add ‘chat_photo_update’ muc action support
git-svn-id: http://svn.miranda-ng.org/main/trunk@14524 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index fbc2bd10c5..8016f5a6f9 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -292,7 +292,7 @@ void CVkProto::AppendChatMessage(int id, const JSONNode &jnMsg, bool bIsHistory)
msgTime = now;
CMString tszBody(jnMsg["body"].as_mstring());
-
+
const JSONNode &jnFwdMessages = jnMsg["fwd_messages"];
if (!jnFwdMessages.isnull()) {
CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, bbcNo);
@@ -306,16 +306,14 @@ void CVkProto::AppendChatMessage(int id, const JSONNode &jnMsg, bool bIsHistory)
CMString tszAttachmentDescr = GetAttachmentDescr(jnAttachments, bbcNo);
if (!tszBody.IsEmpty())
tszAttachmentDescr = _T("\n") + tszAttachmentDescr;
- tszBody += tszAttachmentDescr;
+ tszBody += tszAttachmentDescr;
}
- if (tszBody.IsEmpty() && !jnMsg["action"].isnull()) {
+ if (!jnMsg["action"].isnull()) {
bIsAction = true;
CMString tszAction = jnMsg["action"].as_mstring();
- if (tszAction.IsEmpty())
- tszBody = _T("...");
- else if (tszAction == _T("chat_create")) {
+ if (tszAction == _T("chat_create")) {
CMString tszActionText = jnMsg["action_text"].as_mstring();
tszBody.AppendFormat(_T("%s \"%s\""), TranslateT("create chat"), tszActionText.IsEmpty() ? _T(" ") : tszActionText);
}
@@ -377,6 +375,8 @@ void CVkProto::AppendChatMessage(int id, const JSONNode &jnMsg, bool bIsHistory)
if (!bIsHistory)
SetChatTitle(cc, tszTitle);
}
+ else if (tszAction == _T("chat_photo_update"))
+ tszBody.Replace(TranslateT("Attachments:"), TranslateT("changed chat cover:"));
else
tszBody.AppendFormat(_T(": %s (%s)"), TranslateT("chat action not supported"), tszAction);
}