Handle notifications with error avatars better

parent 697d77c9
......@@ -403,9 +403,16 @@ class NotificationData {
File senderAvatar;
if (sender.avatarUrl != null) {
senderAvatar = await DefaultCacheManager().getSingleFile(
sender.avatarUrl.toHttpsWith(user.context.homeserver, thumbnail: true),
);
try {
senderAvatar = await DefaultCacheManager().getSingleFile(
sender.avatarUrl.toHttpsWith(
user.context.homeserver,
thumbnail: true,
),
);
} on Exception {
senderAvatar = null;
}
}
final chat = Chat(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment