mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Handle media source validation more gracefully. (#3571)
* Handle media source validation more gracefully. * Fix unit tests.
This commit is contained in:
@@ -55,7 +55,7 @@ struct NotificationItemProxy: NotificationItemProxyProtocol {
|
||||
var senderAvatarMediaSource: MediaSourceProxy? {
|
||||
if let senderAvatarURLString = notificationItem.senderInfo.avatarUrl,
|
||||
let senderAvatarURL = URL(string: senderAvatarURLString) {
|
||||
return MediaSourceProxy(url: senderAvatarURL, mimeType: nil)
|
||||
return try? MediaSourceProxy(url: senderAvatarURL, mimeType: nil)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -63,7 +63,7 @@ struct NotificationItemProxy: NotificationItemProxyProtocol {
|
||||
var roomAvatarMediaSource: MediaSourceProxy? {
|
||||
if let roomAvatarURLString = notificationItem.roomInfo.avatarUrl,
|
||||
let roomAvatarURL = URL(string: roomAvatarURLString) {
|
||||
return MediaSourceProxy(url: roomAvatarURL, mimeType: nil)
|
||||
return try? MediaSourceProxy(url: roomAvatarURL, mimeType: nil)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user