diff --git a/StudKit/Notifications/HookService.swift b/StudKit/Notifications/HookService.swift index a33d8db4..ecb61773 100644 --- a/StudKit/Notifications/HookService.swift +++ b/StudKit/Notifications/HookService.swift @@ -70,6 +70,7 @@ public final class HookService { // MARK: - Updating Hooks func updateOrCreate(hook: Hook, completion: @escaping ResultHandler) { + guard User.current?.organization.supportsNotifications ?? false else { return } studIpService.api.requestDecoded(.updateOrCreateHook(hook)) { (result: Result) in completion(result) } } @@ -86,6 +87,7 @@ public final class HookService { } func deleteHook(withId hookId: String, completion: @escaping ResultHandler) { + guard User.current?.organization.supportsNotifications ?? false else { return } studIpService.api.request(.deleteHook(withId: hookId)) { completion($0.map { _ in }) } }