mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 23:09:35 +01:00
fix: Images with an info block but no size crashing
This commit is contained in:
parent
e2cda420e2
commit
5f58789dbf
@ -43,9 +43,11 @@ extension LocalizedBody on Event {
|
||||
[MessageTypes.Image, MessageTypes.Sticker].contains(messageType) &&
|
||||
(kIsWeb ||
|
||||
(content['info'] is Map &&
|
||||
content['info']['size'] is int &&
|
||||
content['info']['size'] < room.client.database.maxFileSize) ||
|
||||
(hasThumbnail &&
|
||||
content['info']['thumbnail_info'] is Map &&
|
||||
content['info']['thumbnail_info']['size'] is int &&
|
||||
content['info']['thumbnail_info']['size'] <
|
||||
room.client.database.maxFileSize) ||
|
||||
(content['url'] is String));
|
||||
|
Loading…
Reference in New Issue
Block a user