Recent project included email notifications on data changes. I associated this as a permission attached to an assignable role. It would be nice if this were a more robust notifications module that could also show notifications in the UI and allow user control of whether to receive emails or not.
Sketch API:
notifications.register(name, roles) - registers a notification and permission-role association.
notifications.send(name, subject, body) - finds users and stores a copy of the notification in db + sends email if user configured.
notifications.userNotifications(user) - for UI to render notifications list
notifications.userPreference(user, name, {email: false}) - for UI to alter user preferences.
TBD how this should interact with object-level permissions.
Recent project included email notifications on data changes. I associated this as a permission attached to an assignable role. It would be nice if this were a more robust notifications module that could also show notifications in the UI and allow user control of whether to receive emails or not.
Sketch API:
notifications.register(name, roles)
- registers a notification and permission-role association.notifications.send(name, subject, body)
- finds users and stores a copy of the notification in db + sends email if user configured.notifications.userNotifications(user)
- for UI to render notifications listnotifications.userPreference(user, name, {email: false})
- for UI to alter user preferences.TBD how this should interact with object-level permissions.