Add warning message to 'mentions and keywords only' notification option (#2028)

* Add warning message to 'mentions and keywords only'

 It should be displayed when it's not supported by the homeserver

* Only display disclaimer in the room notification settings if the room is encrypted

Co-authored-by: Benoit Marty <benoit@matrix.org>

* Fix test and add another one

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
This commit is contained in:
Jorge Martin Espinosa 2023-12-14 17:15:39 +01:00 committed by GitHub
parent e725747ea3
commit d27e9e5265
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 215 additions and 149 deletions

View file

@ -140,4 +140,9 @@ class RustNotificationSettingsService(
runCatching {
notificationSettings.getRoomsWithUserDefinedRules(enabled = true)
}
override suspend fun canHomeServerPushEncryptedEventsToDevice(): Result<Boolean> =
runCatching {
notificationSettings.canHomeserverPushEncryptedEventToDevice()
}
}