summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-12-08 23:07:13 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2021-12-08 23:10:19 +0100
commitcf31fff5fe3c5e1291f1cba9a18490ce054eff70 (patch)
tree0654d53e4d7053d89ba2a81221500a89ac6a5e03 /src
parentTranslated using Weblate (Indonesian) (diff)
downloadnheko-cf31fff5fe3c5e1291f1cba9a18490ce054eff70.tar.xz
Fix blurry thumbnails AGAIN
Diffstat (limited to 'src')
-rw-r--r--src/MxcImageProvider.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/MxcImageProvider.cpp b/src/MxcImageProvider.cpp

index f77f2b0a..4834c2fc 100644 --- a/src/MxcImageProvider.cpp +++ b/src/MxcImageProvider.cpp
@@ -100,7 +100,11 @@ MxcImageProvider::download(const QString &id, if (temp != infos.end()) encryptionInfo = *temp; - if (requestedSize.isValid() && !encryptionInfo) { + if (requestedSize.isValid() && + !encryptionInfo + // Protect against synapse not following the spec: + // https://github.com/matrix-org/synapse/issues/5302 + && requestedSize.height() <= 600 && requestedSize.width() <= 800) { QString fileName = QString("%1_%2x%3_%4_radius%5") .arg(QString::fromUtf8(id.toUtf8().toBase64( QByteArray::Base64UrlEncoding | QByteArray::OmitTrailingEquals)))