Skip to content

Commit

Permalink
docs: about how to prevent sending certain notifications type through…
Browse files Browse the repository at this point in the history
… email
  • Loading branch information
aleortega committed Aug 26, 2024
1 parent 5a27a5d commit 94275c1
Showing 1 changed file with 6 additions and 0 deletions.
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.

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.

# Run locally

Expand Down

0 comments on commit 94275c1

Please sign in to comment.