Show inline images

(This is such a hack and will probably break, but it works for now for
most cases...)
This commit is contained in:
Nicolas Werner 2020-05-14 00:41:10 +02:00
parent 2c3d09edbb
commit 279bcd1bf2

View file

@ -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_))));
}