Merge pull request #6456 from matrix-org/dbkr/fix_images_without_thumbnail

Fix display of image messages that lack thumbnails
pull/21833/head
David Baker 2021-07-22 22:55:58 +01:00 committed by GitHub
commit 46646eed06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -67,6 +67,7 @@ export class MediaEventHelper implements IDestroyable {
private prepareThumbnailUrl = async () => { private prepareThumbnailUrl = async () => {
if (this.media.isEncrypted) { if (this.media.isEncrypted) {
const blob = await this.thumbnailBlob.value; const blob = await this.thumbnailBlob.value;
if (blob === null) return null;
return URL.createObjectURL(blob); return URL.createObjectURL(blob);
} else { } else {
return this.media.thumbnailHttp; return this.media.thumbnailHttp;