From f1c007c655a7e5c39b9482f5e41e2bc0214dd021 Mon Sep 17 00:00:00 2001 From: "h.carnot" Date: Wed, 6 Apr 2022 11:09:05 +0200 Subject: [PATCH] feat: fallback to thumbnail preview --- lib/src/room.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/room.dart b/lib/src/room.dart index 6f4da2b6..9f0d16ca 100644 --- a/lib/src/room.dart +++ b/lib/src/room.dart @@ -857,6 +857,10 @@ class Room { 'hashes': {'sha256': encryptedThumbnail.sha256} }, if (thumbnail != null) 'thumbnail_info': thumbnail.info, + if (thumbnail?.blurhash != null && + file is MatrixImageFile && + file.blurhash == null) + 'xyz.amorgan.blurhash': thumbnail!.blurhash }, if (extraContent != null) ...extraContent, };