summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2022-12-07 12:47:03 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2022-12-07 12:47:03 +0100
commit283d6361e8c194fd3e2831254a8fb858a9046c82 (patch)
tree82065f50b22bf957000aeeac316b8f864b0a872e /src
parentMerge pull request #1239 from q234rty/master (diff)
downloadnheko-283d6361e8c194fd3e2831254a8fb858a9046c82.tar.xz
Properly check for target room encryption
Diffstat (limited to 'src')
-rw-r--r--src/timeline/TimelineViewManager.cpp3
1 files changed, 2 insertions, 1 deletions
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 <QStandardPaths>
 #include <QString>
 
+#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<mtx::crypto::EncryptedFile> 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,