From cd6fcef67cdf3c72afc98ed149f82af7f6860487 Mon Sep 17 00:00:00 2001 From: ElzorFox Date: Sat, 6 Apr 2024 16:50:31 +0500 Subject: =?UTF-8?q?VKontakte:=20async=20mode=20download=20images=20as=20de?= =?UTF-8?q?fault=20add=20=E2=80=98LoadFilesAsync=E2=80=99=20hiden=20option?= =?UTF-8?q?=20(default=20true)=20add=20dynamic=20show=20image=20in=20NewSt?= =?UTF-8?q?ory=20on=20finish=20download=20add=20option=20for=20bbc=20in=20?= =?UTF-8?q?NewStory=20support=20add=20option=20for=20show=20original=20ver?= =?UTF-8?q?sion=20message=20in=20edited=20message=20version=20bump?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/VKontakte/src/vk_chats.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'protocols/VKontakte/src/vk_chats.cpp') diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index be646621a4..ce8af5ae93 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -376,7 +376,7 @@ void CVkProto::AppendChatConversationMessage(VKUserID_t iChatId, const JSONNode& const JSONNode& jnFwdMessages = jnMsg["fwd_messages"]; if (jnFwdMessages && !jnFwdMessages.empty()) { - CMStringW wszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, bbcNo, vkChatInfo->m_bHistoryRead); + CMStringW wszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, bbcNo); if (!wszBody.IsEmpty()) wszFwdMessages = L"\n" + wszFwdMessages; wszBody += wszFwdMessages; @@ -385,7 +385,7 @@ void CVkProto::AppendChatConversationMessage(VKUserID_t iChatId, const JSONNode& const JSONNode& jnReplyMessages = jnMsg["reply_message"]; if (jnReplyMessages && !jnReplyMessages.empty()) { if (m_vkOptions.bShowReplyInMessage) { - CMStringW wszReplyMessages = GetFwdMessages(jnReplyMessages, jnFUsers, bbcNo, vkChatInfo->m_bHistoryRead); + CMStringW wszReplyMessages = GetFwdMessages(jnReplyMessages, jnFUsers, bbcNo); if (!wszBody.IsEmpty()) wszReplyMessages = L"\n" + wszReplyMessages; wszBody += wszReplyMessages; @@ -396,7 +396,7 @@ void CVkProto::AppendChatConversationMessage(VKUserID_t iChatId, const JSONNode& const JSONNode& jnAttachments = jnMsg["attachments"]; if (jnAttachments && !jnAttachments.empty()) { - CMStringW wszAttachmentDescr = GetAttachmentDescr(jnAttachments, bbcNo, vkChatInfo->m_si->hContact, iMessageId, vkChatInfo->m_bHistoryRead); + CMStringW wszAttachmentDescr = GetAttachmentDescr(jnAttachments, bbcNo, vkChatInfo->m_si->hContact, iMessageId); if (wszAttachmentDescr == L"== FilterAudioMessages ==") return; @@ -422,11 +422,13 @@ void CVkProto::AppendChatConversationMessage(VKUserID_t iChatId, const JSONNode& CMStringW(FORMAT, TranslateT("Edited message (updated %s):\n"), ttime), m_vkOptions.BBCForAttachments(), vkbbcB) + wszBody; - - CMStringW wszOldMsg; - if (GetMessageFromDb(iMessageId, tMsgTime, wszOldMsg)) - wszBody += SetBBCString(TranslateT("\nOriginal message:\n"), m_vkOptions.BBCForAttachments(), vkbbcB) + - wszOldMsg; + + if (m_vkOptions.bShowBeforeEditedPostVersion) { + CMStringW wszOldMsg; + if (GetMessageFromDb(iMessageId, tMsgTime, wszOldMsg)) + wszBody += SetBBCString(TranslateT("\nOriginal message:\n"), m_vkOptions.BBCForAttachments(), vkbbcB) + + wszOldMsg; + } } if (m_vkOptions.bAddMessageLinkToMesWAtt && ((jnAttachments && !jnAttachments.empty()) || (jnFwdMessages && !jnFwdMessages.empty()) || (jnReplyMessages && !jnReplyMessages.empty() && m_vkOptions.bShowReplyInMessage))) -- cgit v1.2.3