-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support user notification preferences #7308
Comments
@nicholaspcr: Please let me know if the backend part makes sense? @pierrephz: Can you think of a draft wireframes for the UX? Please ping me if you have doubts. |
Looks pretty good to me but I do have a question, would it be more efficient to have a Additionally I believe its easier for users to set what they don't want rather than the opposite. |
The question here is the difference of what the default behavior is, User experience-wise, (b) is better since all notifications are available in the Console by default. |
@KrishnaIyer @nicholaspcr @pierrephz Considering that |
I would say let's show it in a non-editable state in the console for admins only. For the API, I think we should just ignore this if it's set in the filters. |
Summary
Support user notification preferences. Replaces https://github.com/TheThingsIndustries/lorawan-stack/issues/3280
Current Situation
Currently users receive emails for all notification types except
collaborator_changed
. We want to allow users to choose what kind of emails they receive.All notifications are displayed in the console. So some users prefer to not receive emails
Why do we need this? Who uses it, and when?
We want to allow users to choose what kind of emails they receive.
Proposed Implementation
Backend
Enum
forNotificationType
in the API. Currently we use hardcoded strings likeuser_requested
orcollaborator_changed
inpkg/email/templates
and when we use theCreateNotificationRequest
message.NotificationPreferences
message inside the User message.repeated NotificationType email_notification_types
. This is a list ofNotificationType
for which we would send emails.user_requested
andclient_requested
, both of which require admin actions. These emails are very infrequent and should not be skipped. So the API should either ignore these enums or return a validation error.emailReceiverIDs
argument. This is a filtered list of receiver IDs.req
is allowed for the user in their preferences.CreateNotification
, callis.SendNotificationEmailToUserIDs
onlyemailReceiverIDs
is not empty.email
field of the Notification message. We should instead get this from the user preferencesThe backend needs to target the
v3.33
branch since this requires a database migration.UX
/console/user-settings/profile
view and rename it toAccount
orPreferences
, whichever makes sense.NotificationType
enums.All
orNone
.Contributing
Validation
Code of Conduct
The text was updated successfully, but these errors were encountered: