Do not allow reply if protected, also set to be removed

This commit is contained in:
ismailgulek 2020-09-16 16:08:02 +03:00
parent b87ab2ae83
commit b41888a9e8

View file

@ -540,10 +540,11 @@ class NotificationService: UNNotificationServiceExtension {
} }
func notificationCategoryIdentifier(forEvent event: MXEvent) -> String? { func notificationCategoryIdentifier(forEvent event: MXEvent) -> String? {
let isNotificationContentShown = !event.isEncrypted || self.showDecryptedContentInNotifications let isNotificationContentShown = (!event.isEncrypted || self.showDecryptedContentInNotifications)
&& !localAuthenticationService.isProtectionSet
guard isNotificationContentShown else { guard isNotificationContentShown else {
return nil return Constants.toBeRemovedNotificationCategoryIdentifier
} }
if event.eventType == .callInvite { if event.eventType == .callInvite {
@ -551,7 +552,7 @@ class NotificationService: UNNotificationServiceExtension {
} }
guard event.eventType == .roomMessage || event.eventType == .roomEncrypted else { guard event.eventType == .roomMessage || event.eventType == .roomEncrypted else {
return nil return Constants.toBeRemovedNotificationCategoryIdentifier
} }
return "QUICK_REPLY" return "QUICK_REPLY"