diff --git a/lib/src/event.dart b/lib/src/event.dart index 924f64e..3157af9 100644 --- a/lib/src/event.dart +++ b/lib/src/event.dart @@ -469,7 +469,7 @@ class Event { // Is this file storeable? final infoMap = getThumbnail ? content['info']['thumbnail_info'] : content['info']; - final storeable = room.client.storeAPI.extended && + final storeable = (room.client.storeAPI?.extended ?? false) && infoMap is Map && infoMap['size'] is int && infoMap['size'] <= room.client.store.maxFileSize;