Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
2 changes: 1 addition & 1 deletion workers/email/src/templates/emails/event/html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
{% endblock %}

{% block unsubscribeLink %}
{{ host ~ '/unsubscribe/' ~ project._id }}
{{ host ~ '/unsubscribe/' ~ project._id ~ '/' ~ notificationRuleId }}
{% endblock %}

{% block unsubscribeText %}
Expand Down
1 change: 1 addition & 0 deletions workers/sender/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ export default abstract class SenderWorker extends Worker {
project,
events: eventsData,
period: channel.minPeriod,
notificationRuleId: rule._id,
},
} as EventNotification | SeveralEventsNotification);
}
Expand Down
5 changes: 5 additions & 0 deletions workers/sender/types/template-variables/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ export interface EventsTemplateVariables extends CommonTemplateVariables {
* Minimal pause between second notification, in seconds
*/
period: number;

/**
* Id of notification rule to unsubscribe
*/
notificationRuleId: string;
}

/**
Expand Down
Loading