Skip to content

Commit d370cbc

Browse files
committed
Update link
1 parent 0604037 commit d370cbc

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

workers/email/src/templates/emails/event/html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
{% endblock %}
5959

6060
{% block unsubscribeLink %}
61-
{{ host ~ '/unsubscribe/' ~ project._id }}
61+
{{ host ~ '/unsubscribe/' ~ notificationRuleId }}
6262
{% endblock %}
6363

6464
{% block unsubscribeText %}

workers/sender/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ export default abstract class SenderWorker extends Worker {
196196
project,
197197
events: eventsData,
198198
period: channel.minPeriod,
199+
notificationRuleId: rule._id,
199200
},
200201
} as EventNotification | SeveralEventsNotification);
201202
}

workers/sender/types/template-variables/event.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ export interface EventsTemplateVariables extends CommonTemplateVariables {
4545
* Minimal pause between second notification, in seconds
4646
*/
4747
period: number;
48+
49+
/**
50+
* Id of notification rule to unsubscribe
51+
*/
52+
notificationRuleId: string;
4853
}
4954

5055
/**

0 commit comments

Comments
 (0)