Removed bug where notifications where discarded because of missing roomDisplayNames

This commit is contained in:
Arnfried Griesert
2024-08-20 07:54:12 +02:00
parent f1ecfe2894
commit 9149992f0b

View File

@@ -367,15 +367,15 @@ class NotificationService: UNNotificationServiceExtension {
if localAuthenticationService.isProtectionSet {
MXLog.debug("[NotificationService] preprocessPayload: Do not preprocess because app protection is set")
guard let roomDisplayName = roomSummary.displayName else {
throw NSEError.displayNameNotAvailable
}
// bwi: 5068 - hide content in message notifications
if BWIBuildSettings.shared.bwiHideNotificationMessageBody {
// Hide the content
bestAttemptContents[eventId]?.body = NotificationService.localizedString(forKey: "MESSAGE_PROTECTED")
} else {
guard let roomDisplayName = roomSummary.displayName else {
throw NSEError.displayNameNotAvailable
}
bestAttemptContents[eventId]?.title = roomDisplayName
// At this stage we don't know the message type, so leave the body as set in didReceive.
}