Add notification setting to enable/disable being notified for room invite (#1944)

This commit is contained in:
Benoit Marty 2023-12-04 13:07:21 +01:00 committed by Benoit Marty
parent 0573dda874
commit 66ac1e271f
10 changed files with 75 additions and 6 deletions

View file

@ -124,6 +124,18 @@ class RustNotificationSettingsService(
}
}
override suspend fun isInviteForMeEnabled(): Result<Boolean> = withContext(dispatchers.io) {
runCatching {
notificationSettings.isInviteForMeEnabled()
}
}
override suspend fun setInviteForMeEnabled(enabled: Boolean): Result<Unit> = withContext(dispatchers.io) {
runCatching {
notificationSettings.setInviteForMeEnabled(enabled)
}
}
override suspend fun getRoomsWithUserDefinedRules(): Result<List<String>> =
runCatching {
notificationSettings.getRoomsWithUserDefinedRules(enabled = true)