Skip to content

Completed backend tasks to allow unsubscribing and emailing users who have opted in

Susheel Varma requested to merge IG-413 into dev

Created by: RobinKavPA

PR

unsubscribe link even when user is not logged in

link with unique id

Solution

  1. Created new endpoint 'api/v1/person/unsubscribe/:userObjectId' to unsubscribe a user from email updates.
  2. Created generic email send function that accepts a list of user objects and appends an HTML footer including an optional/parameter driven user specific unsubscribe link.
  3. Refactored all instances of SendGrid usage to use generic send function
  4. Updated all email dispatch functions to take consideration of users 'opt in' status - previous sending emails based on actioner's opt status. E.g. approving a tool would send an email to all authors and admins if I as the user had opted in.
  5. Added de-duping to prevent sending the same emails to a contact twice. E.g. if a user is an author and an admin and any future use cases.

Merge request reports