Skip to content

Commit

Permalink
Refactor user enabled_notifications parameter to provide support for …
Browse files Browse the repository at this point in the history
…other notification types.
  • Loading branch information
IonesioJunior committed Feb 23, 2024
1 parent 99fcfa7 commit f348928
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/syft/src/syft/service/user/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
from ..response import SyftError
from ..response import SyftSuccess
from .user_roles import ServiceRole

from ..notifier.notifier_enums import NOTIFIERS

@serializable()
class UserV1(SyftObject):
Expand Down Expand Up @@ -97,7 +97,12 @@ def make_email(cls, v: EmailStr) -> EmailStr:
return EmailStr(v)

# fields
email_notifications_enabled: bool = True
notifications_enabled: Dict[NOTIFIERS, bool] = {
NOTIFIERS.EMAIL: True,
NOTIFIERS.SMS: False,
NOTIFIERS.SLACK: False,
NOTIFIERS.APP: False,
}
email: Optional[EmailStr]
name: Optional[str]
hashed_password: Optional[str]
Expand Down

0 comments on commit f348928

Please sign in to comment.