From e8271acd9909125ccc6d4e1f5bcb11feb4d12d35 Mon Sep 17 00:00:00 2001
From: Nicolas Werner <nicolas.werner@hotmail.de>
Date: Tue, 21 Apr 2020 09:03:36 +0200
Subject: [PATCH] Fix own encrypted images not showing up after sending

---
 src/timeline/TimelineModel.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index 262fa10ad..7e124f47d 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -1225,6 +1225,10 @@ struct SendMessageVisitor
 
         {
                 if (cache::isRoomEncrypted(model_->room_id_.toStdString())) {
+                        auto encInfo = mtx::accessors::file(msg);
+                        if (encInfo)
+                                emit model_->newEncryptedImage(encInfo.value());
+
                         model_->sendEncryptedMessage(txn_id_qstr_.toStdString(),
                                                      nlohmann::json(msg.content));
                 } else {
-- 
GitLab