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

docs: about how to prevent sending certain notifications type through email #101

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,12 @@ sequenceDiagram
> If the email sent in the `PUT /set-email` request is an empty string, the email will be removed from the subscription and email notifications will be
> deactivated for the user.

### Prevent sending emails for certain type of notifications
Currently, the service broadcasts notifications both via email and in-world inboxes. Whenever a new notification is added, the service attempts to deliver it through both channels. However, certain notifications should be broadcasted exclusively in-world to avoid cluttering users’ email inboxes.
aleortega marked this conversation as resolved.
Show resolved Hide resolved

The service will attempt to send email notifications if a corresponding template is available in the `processor/src/adapters/email-templates/` directory. To prevent a notification from being sent via email and only broadcast it in-world, simply avoid adding or remove the email template for that notification from this directory.

Additionally, the service tests must be adjusted since they automatically check for a matching template for every notification type. For notifications intended to be broadcasted only in-world, it is needed to exclude them from the test suite located at `/processor/test/unit/adapters/email-renderer.spec.ts`, as has already been done for the `BADGE_GRANTED` notification type.
aleortega marked this conversation as resolved.
Show resolved Hide resolved

# Run locally

Expand Down
Loading