feat(notifications): tell a new journey contributor they were added

Adding somebody to a journey was silent (#1669). The new journey_invite
event goes to the person added, in-app with a button to the journey and on
every channel they use, once: posting the same person again only changes
their role. The REST route and the MCP tool both go through
JourneyService.addContributor, so both send it; the send is fire and forget
like the trip and collection invites.

The event is listed while the Journey addon is on, with its label in the
notification settings, and its texts are translated in every locale.
This commit is contained in:
Maurice
2026-11-30 14:36:52 +01:00
parent 55fc5f6679
commit ea9d66868a
95 changed files with 326 additions and 5 deletions
@@ -14,6 +14,10 @@ export interface NotificationChannelDescriptor {
configured: boolean
}
// The table below is read through a variable, which the i18n key scan cannot
// follow; a label added since is named in a *Key binding so it reads as used.
const journeyInviteLabelKey = 'settings.notifyJourneyInvite'
export const EVENT_LABEL_KEYS: Record<string, string> = {
trip_invite: 'settings.notifyTripInvite',
booking_change: 'settings.notifyBookingChange',
@@ -22,6 +26,7 @@ export const EVENT_LABEL_KEYS: Record<string, string> = {
vacay_invite: 'settings.notifyVacayInvite',
vacay_share: 'settings.notifyVacayShare',
collection_invite: 'settings.notifyCollectionInvite',
journey_invite: journeyInviteLabelKey,
synology_session_cleared: 'settings.notifySynologySessionCleared',
plugin_notification: 'settings.notifyPluginNotification',
photos_shared: 'settings.notifyPhotosShared',