Skip to content
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

Email Alerts #43

Open
5 tasks done
nathangong opened this issue Nov 7, 2024 · 0 comments
Open
5 tasks done

Email Alerts #43

nathangong opened this issue Nov 7, 2024 · 0 comments
Assignees

Comments

@nathangong
Copy link
Collaborator

nathangong commented Nov 7, 2024

Description

The goal for this sprint is to set up email notifications for FOCUS family accounts, using infra’s Juno email service (contact your EM for the docs). Users should receive email notifications whenever they receive comments on their posts. Notifications will be sent together in one batched email once every day. Don't worry too much about the content of the email. For now, just include all the comments a user received, in a format like so:

[Post 1 Name]
Billy family commented: .....
Bob family commented: .....

[Post 2 Name]
Alice family commented: ....

Acceptance Criteria

  • Create a Notification schema with relevant backend actions. This schema should contain post author id, post id, comment id, commenter id, and time created.
  • Listen to save events in the Comments collection. For each event, add a corresponding document to the notification collection.
  • Implement a Netlify function that fetches all notification documents created in the past 24 hours, and sends an email notification through Juno to all relevant users. Notification documents should be deleted once the email alert is sent. Schedule this to run every day at 5 PM. Reach out to your EM for any auth passwords you may need.
  • Notifications should be emailed in batches. If a user receives multiple comments on any of their posts, they should receive them all in one email.
  • Ensure that users who have turned off notifications in settings do not receive email alerts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants