diff --git a/packages/syft/src/syft/service/notifier/notifier_service.py b/packages/syft/src/syft/service/notifier/notifier_service.py index 687eb4dfe85..aceea1760ab 100644 --- a/packages/syft/src/syft/service/notifier/notifier_service.py +++ b/packages/syft/src/syft/service/notifier/notifier_service.py @@ -51,9 +51,17 @@ def turn_off( self, context: AuthedServiceContext, ) -> Union[SyftSuccess, SyftError]: - return SyftError(message="Not Implemented") - # Set Notifier Model active field to False - # Store the current state of the notifier in the stash + result = self.stash.get(credentials=context.credentials) + + if result.is_err(): + return SyftError(message=result.err()) + + notifier = result.ok() + notifier.active = False + result = self.stash.update(credentials=context.credentials, settings=notifier) + if result.is_err(): + return SyftError(message=result.err()) + return SyftSuccess(message="Notifier turned off") @service_method( path="notifier.enable_notifications",