mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-01 00:43:15 +00:00
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user