From 279bcd1bf2a052330a51637d8867ae525a3c20a0 Mon Sep 17 00:00:00 2001
From: Nicolas Werner <nicolas.werner@hotmail.de>
Date: Thu, 14 May 2020 00:41:10 +0200
Subject: [PATCH] Show inline images

(This is such a hack and will probably break, but it works for now for
most cases...)
---
 src/timeline/TimelineModel.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index 99656d191..b7e900344 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -294,6 +294,10 @@ TimelineModel::data(const QString &id, int role) const
                         if (isReply)
                                 formattedBody_ = formattedBody_.remove(replyFallback);
                 }
+
+                formattedBody_.replace("<img src=\"mxc:&#47;&#47;", "<img src=\"image://mxcImage/");
+                formattedBody_.replace("<img src=\"mxc://", "<img src=\"image://mxcImage/");
+
                 return QVariant(utils::replaceEmoji(
                   utils::linkifyMessage(utils::escapeBlacklistedHtml(formattedBody_))));
         }
-- 
GitLab