Add toggle not invite notifications. (#2207)

This commit is contained in:
Doug
2023-12-06 09:53:10 +00:00
committed by GitHub
parent 731333a1cf
commit c7531be44c
15 changed files with 203 additions and 14 deletions
@@ -141,6 +141,18 @@ final class NotificationSettingsProxy: NotificationSettingsProxyProtocol {
await updatedSettings()
}
func isInviteForMeEnabled() async throws -> Bool {
try await notificationSettings.isInviteForMeEnabled()
}
func setInviteForMeEnabled(enabled: Bool) async throws {
let backgroundTask = await backgroundTaskService?.startBackgroundTask(withName: "setInviteForMeEnabled")
defer { backgroundTask?.stop() }
try await notificationSettings.setInviteForMeEnabled(enabled: enabled)
await updatedSettings()
}
func getRoomsWithUserDefinedRules() async throws -> [String] {
await notificationSettings.getRoomsWithUserDefinedRules(enabled: true)
}
@@ -40,6 +40,8 @@ protocol NotificationSettingsProxyProtocol {
func setUserMentionEnabled(enabled: Bool) async throws
func isCallEnabled() async throws -> Bool
func setCallEnabled(enabled: Bool) async throws
func isInviteForMeEnabled() async throws -> Bool
func setInviteForMeEnabled(enabled: Bool) async throws
func getRoomsWithUserDefinedRules() async throws -> [String]
func canHomeserverPushEncryptedEventsToDevice() async -> Bool
}