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_messages.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'protocols/VKontakte/src/vk_messages.cpp') diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp index 5f1a2e55dd..b77cc65629 100644 --- a/protocols/VKontakte/src/vk_messages.cpp +++ b/protocols/VKontakte/src/vk_messages.cpp @@ -382,7 +382,7 @@ void CVkProto::OnReceiveMessages(MHttpResponse *reply, AsyncHttpRequest *pReq) const JSONNode& jnFwdMessages = jnMsg["fwd_messages"]; if (jnFwdMessages && !jnFwdMessages.empty()) { - CMStringW wszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, m_vkOptions.BBCForAttachments(), false); + CMStringW wszFwdMessages = GetFwdMessages(jnFwdMessages, jnFUsers, m_vkOptions.BBCForAttachments()); if (!wszBody.IsEmpty()) wszFwdMessages = L"\n" + wszFwdMessages; wszBody += wszFwdMessages; @@ -391,7 +391,7 @@ void CVkProto::OnReceiveMessages(MHttpResponse *reply, AsyncHttpRequest *pReq) const JSONNode& jnReplyMessages = jnMsg["reply_message"]; if (jnReplyMessages && !jnReplyMessages.empty()) if (m_vkOptions.bShowReplyInMessage) { - CMStringW wszReplyMessages = GetFwdMessages(jnReplyMessages, jnFUsers, m_vkOptions.BBCForAttachments(), false); + CMStringW wszReplyMessages = GetFwdMessages(jnReplyMessages, jnFUsers, m_vkOptions.BBCForAttachments()); if (!wszBody.IsEmpty()) wszReplyMessages = L"\n" + wszReplyMessages; wszBody += wszReplyMessages; @@ -404,7 +404,7 @@ void CVkProto::OnReceiveMessages(MHttpResponse *reply, AsyncHttpRequest *pReq) CMStringW wszAttachmentDescr; const JSONNode& jnAttachments = jnMsg["attachments"]; if (jnAttachments && !jnAttachments.empty()) { - wszAttachmentDescr = GetAttachmentDescr(jnAttachments, m_vkOptions.BBCForAttachments(), hContact, iMessageId, false); + wszAttachmentDescr = GetAttachmentDescr(jnAttachments, m_vkOptions.BBCForAttachments(), hContact, iMessageId); if (wszAttachmentDescr == L"== FilterAudioMessages ==") { if (hContact && (iMessageId > ReadQSWord(hContact, "lastmsgid", -1))) @@ -437,11 +437,12 @@ void CVkProto::OnReceiveMessages(MHttpResponse *reply, AsyncHttpRequest *pReq) CMStringW(FORMAT, TranslateT("Edited message (updated %s):\n"), ttime), m_vkOptions.BBCForAttachments(), vkbbcB) + wszBody; - - CMStringW wszOldMsg; - if (GetMessageFromDb(iMessageId, tDateTime, wszOldMsg)) - wszBody += SetBBCString(TranslateT("\nOriginal message:\n"), m_vkOptions.BBCForAttachments(), vkbbcB) + - wszOldMsg; + if (m_vkOptions.bShowBeforeEditedPostVersion) { + CMStringW wszOldMsg; + if (GetMessageFromDb(iMessageId, tDateTime, wszOldMsg)) + wszBody += SetBBCString(TranslateT("\nOriginal message:\n"), m_vkOptions.BBCForAttachments(), vkbbcB) + + wszOldMsg; + } } DB::EventInfo dbei; -- cgit v1.2.3