32 lines
1.3 KiB
TypeScript
32 lines
1.3 KiB
TypeScript
/**
|
|
* Threema central gateway info shown to customers.
|
|
*
|
|
* Today PieCed runs exactly one Threema Gateway account (*AIAGENT) and
|
|
* every tenant talks to that. The constants below are hardcoded for
|
|
* that account. The values are intentionally kept here (and not split
|
|
* across i18n / env / runtime config) so when we move to multiple
|
|
* gateway accounts there's a single file to refactor.
|
|
*
|
|
* To go dynamic (future):
|
|
* 1. Replace `THREEMA_GATEWAY` constant with a runtime lookup —
|
|
* either per-tenant from the relay's admin API, or from an
|
|
* env var that lists the active account.
|
|
* 2. Move the QR PNG into a server-rendered route that takes a
|
|
* gateway ID query param.
|
|
* 3. Update consumers to accept the gateway info as a prop and pass
|
|
* it from a server component.
|
|
*/
|
|
|
|
export const THREEMA_GATEWAY = {
|
|
/** Technical Threema Gateway ID, with leading asterisk. */
|
|
id: "*AIAGENT",
|
|
/**
|
|
* Display name shown to customers. INCLUDES the leading asterisk —
|
|
* customers need to recognise this exact string in their Threema
|
|
* contacts after scanning the QR, so we don't strip it.
|
|
*/
|
|
displayName: "*AIAGENT",
|
|
/** Public path to the QR code PNG served from `public/`. */
|
|
qrCodePath: "/threema/qr_code_AIAGENT.png",
|
|
} as const;
|