Skip to content

listing-status-change

Source of truth: packages/notifications/src/translations.ts

DomainChannelsRecipients
alertsin-app + emailEvery user who favorited the property

No triggerWorkflow calls found in the scanned source paths.

interface ListingStatusChangeData {
propertyAddress: string;
newStatus: string;
listingUrl: string;
}

The caller invokes triggerWorkflow('listing-status-change', recipientIds, data) where data is the ListingStatusChangeData shape above. The server pre-translates the payload via getTranslatedPayload('listing-status-change', recipientLocale, data) from @repo/notifications before sending, producing { inAppBody, emailSubject, emailBody } for the dashboard templates to render.

Knock dashboard template body: {{ inAppBody }}.

LocalePreview source
es📋 Tu propiedad en ${p.propertyAddress} ahora está ${translateStatus(p.newStatus, 'es')}
en📋 Your listing at ${p.propertyAddress} is now ${translateStatus(p.newStatus, 'en')}

Subject: {{ emailSubject }}. Body: {{ emailBody }} (HTML mode, dashboard escaping OFF — every user-supplied string is escaped server-side via escapeHtml from @repo/notifications).

LocaleSubject preview
esTu propiedad en ${p.propertyAddress} cambió de estado
enYour listing at ${p.propertyAddress} status changed

Email body is composed by emailBody.es in packages/notifications/src/translations.ts via the layout components in packages/notifications/src/email-layout.ts (wrapEmailLayout, ctaButton, calloutBox, quoteBlock, propertyCard, detailTable / detailRow). Body source is not inlined here because it spans tens of lines per locale — open the source file for the full template.