From 283d6361e8c194fd3e2831254a8fb858a9046c82 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 7 Dec 2022 12:47:03 +0100 Subject: [PATCH] Properly check for target room encryption --- src/timeline/TimelineViewManager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp index 490bf726..12a247c8 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp @@ -10,6 +10,7 @@ #include #include +#include "Cache.h" #include "ChatPage.h" #include "CombinedImagePackModel.h" #include "CommandCompleter.h" @@ -461,7 +462,7 @@ TimelineViewManager::forwardMessageToRoom(mtx::events::collections::TimelineEven auto content = mtx::accessors::url(*e); std::optional encryptionInfo = mtx::accessors::file(*e); - if (encryptionInfo) { + if (encryptionInfo && !cache::isRoomEncrypted(roomId.toStdString())) { http::client()->download( content, [this, roomId, e, encryptionInfo](const std::string &res,