mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Do not allow reply if protected, also set to be removed
This commit is contained in:
parent
b87ab2ae83
commit
b41888a9e8
1 changed files with 4 additions and 3 deletions
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue