diff options
author | ElzorFox <elzorfox@ya.ru> | 2024-04-06 16:50:31 +0500 |
---|---|---|
committer | ElzorFox <elzorfox@ya.ru> | 2024-04-06 16:50:31 +0500 |
commit | cd6fcef67cdf3c72afc98ed149f82af7f6860487 (patch) | |
tree | 6cbb7729a51c79b9d12f31b7fe9f31b494a95f35 /protocols/VKontakte/src/vk_messages.cpp | |
parent | 4fdf5f999f94ad09a2cb44c8e879b98a6a5fcf0f (diff) |
VKontakte:
async mode download images as default
add ‘LoadFilesAsync’ hiden option (default true)
add dynamic show image in NewStory on finish download
add option for bbc in NewStory support
add option for show original version message in edited message
version bump
Diffstat (limited to 'protocols/VKontakte/src/vk_messages.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_messages.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
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;
|