diff --git a/src/models/messageeventmodel.cpp b/src/models/messageeventmodel.cpp index 68d545275..bf04a9d20 100644 --- a/src/models/messageeventmodel.cpp +++ b/src/models/messageeventmodel.cpp @@ -944,12 +944,12 @@ QVariantMap MessageEventModel::getMediaInfoFromFileInfo(const EventContent::File QVariantMap mediaInfo; // Get the mxc URL for the media. - if (!fileInfo->url().isValid() || eventId.isEmpty()) { + if (!fileInfo->url().isValid() || fileInfo->url().scheme() != QStringLiteral("mxc") || eventId.isEmpty()) { mediaInfo["source"] = QUrl(); } else { QUrl source = m_currentRoom->makeMediaUrl(eventId, fileInfo->url()); - if (source.isValid() && source.scheme() == QStringLiteral("mxc")) { + if (source.isValid()) { mediaInfo["source"] = source; } else { mediaInfo["source"] = QUrl();