mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-16 06:28:27 +02:00
Patched hotfix changes from bum into hotfix branch 5068_hide_room_display_in_notifications
This commit is contained in:
@@ -371,8 +371,14 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
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.
|
||||
// bwi: 5068 - hide content in message notifications
|
||||
if BWIBuildSettings.shared.bwiHideNotificationMessageBody {
|
||||
// Hide the content
|
||||
bestAttemptContents[eventId]?.body = NotificationService.localizedString(forKey: "MESSAGE_PROTECTED")
|
||||
} else {
|
||||
bestAttemptContents[eventId]?.title = roomDisplayName
|
||||
// At this stage we don't know the message type, so leave the body as set in didReceive.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -435,6 +441,7 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
content.title = newContent.title
|
||||
content.subtitle = newContent.subtitle
|
||||
content.body = newContent.body
|
||||
@@ -766,8 +773,14 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
case .pollEnd:
|
||||
notificationTitle = self.messageTitle(for: eventSenderName, in: roomDisplayName)
|
||||
notificationBody = VectorL10n.pollTimelineEndedText
|
||||
// bwi 1.9.15: hide content in pollend notifications
|
||||
|
||||
|
||||
// bwi 5068: use standard ecryption title and body
|
||||
if BWIBuildSettings.shared.bwiHideNotificationMessageBody {
|
||||
// Hide the content
|
||||
notificationTitle = nil
|
||||
notificationBody = NotificationService.localizedString(forKey: "MESSAGE_PROTECTED")
|
||||
}
|
||||
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user