Skip to content

Conversation

@neSpecc
Copy link
Member

@neSpecc neSpecc commented Dec 23, 2025

Problem

For each event we send email with link to the original event. Not the particular repetition.

Cause

Grouper was added a task to Notifier without passing a repetitionId.

Solution

  • Now we pass repetitionId from Grouper to Notifier
  • Notifier passes it to the Sender
  • Sender passes it to corresponded templates
  • Event Links now contains repetitionId
image

Introduces the repetitionId field to event notification data structures and templates, allowing emails and notifications to reference specific event repetitions. Updates TypeScript interfaces, worker logic, and email templates to support and display repetitionId where applicable.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for linking to specific event repetitions in email notifications. Previously, all event emails linked to the original event regardless of which repetition triggered the notification. Now, the repetitionId is passed through the entire notification pipeline (Grouper → Notifier → Sender → Email templates) to generate URLs that point to the specific repetition that triggered the notification.

Key Changes:

  • Added repetitionId field to type definitions across the notification pipeline
  • Updated email templates to conditionally generate URLs with repetition ID when available
  • Added test assertion for the new repetitionId field

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
workers/sender/types/template-variables/event.ts Added optional repetitionId field to TemplateEventData interface
workers/sender/src/index.ts Extracts and forwards repetitionId from event data to template variables
workers/notifier/types/notifier-task.ts Added repetitionId field to NotifierEvent type
workers/notifier/types/channel.ts Added repetitionId field to SenderData interface
workers/notifier/src/index.ts Passes repetitionId from event to sender worker
workers/grouper/tests/index.test.ts Updated test to expect repetitionId: null for new events
workers/grouper/src/index.ts Converts ObjectId to string and passes repetitionId to notifier
workers/email/src/templates/emails/event/text.twig Conditionally generates URL with /repetitionId/overview when repetitionId exists
workers/email/src/templates/emails/event/html.twig Conditionally generates URL with /repetitionId/overview when repetitionId exists

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@neSpecc neSpecc merged commit 8844840 into master Dec 24, 2025
10 checks passed
@neSpecc neSpecc deleted the event-email-repetition branch December 24, 2025 12:55
neSpecc added a commit that referenced this pull request Dec 24, 2025
…articular repetition (#499) (#502)

* Add repetitionId to event notification flow

Introduces the repetitionId field to event notification data structures and templates, allowing emails and notifications to reference specific event repetitions. Updates TypeScript interfaces, worker logic, and email templates to support and display repetitionId where applicable.

* fix grouper test

Co-authored-by: Peter <specc.dev@gmail.com>
neSpecc added a commit that referenced this pull request Dec 24, 2025
* chore(event-email): event email notification now contains link to a particular repetition  (#499)

* Add repetitionId to event notification flow

Introduces the repetitionId field to event notification data structures and templates, allowing emails and notifications to reference specific event repetitions. Updates TypeScript interfaces, worker logic, and email templates to support and display repetitionId where applicable.

* fix grouper test

* fix(sentry): replay skipping improved (#503)

* fix sentry replay skipping

* lint code

* Update index.test.ts

---------

Co-authored-by: Peter <specc.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants