Skip to content

Commit c58e286

Browse files
sung17Deathgiver
andauthored
fix(flows): correct email template variable and add tiktok integration field (#554)
- Replace {{page_name}} with {{page_user_name}} in email step default footer - Add tiktok case to getIntegrationField for inbox name resolution - Add integrationTiktok to InboxWithIntegrations type Co-authored-by: Deathgiver <anonymous@users.noreply.github.com>
1 parent 9fad512 commit c58e286

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

packages/database/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export type InboxWithIntegrations = InboxModel & {
114114
integrationWhatsapp?: IntegrationWhatsappModel | null
115115
integrationZalo?: IntegrationZaloModel | null
116116
integrationSmtp?: IntegrationSmtpModel | null
117+
integrationTiktok?: IntegrationTiktokModel | null
117118
}
118119

119120
export type ContactOnSmartDelayModel =

packages/flow-config/src/steps/email.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export const emailStepDefaultFn = (
135135
{
136136
id: createId(),
137137
type: pageElementTypes.enum.text,
138-
text: `You received this email from {{page_name}}. If you would like to unsubscribe, <a href="${UNSUBSCRIBE_PLACEHOLDER}">click here</a>`,
138+
text: `You received this email from {{page_user_name}}. If you would like to unsubscribe, <a href="${UNSUBSCRIBE_PLACEHOLDER}">click here</a>`,
139139
},
140140
],
141141
...props,

packages/variables/src/helpers/integration-fields.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ export const getIntegrationField = async (
100100
return inbox.integrationWhatsapp?.name ?? null
101101
case channelTypes.enum.zalo:
102102
return inbox.integrationZalo?.name ?? null
103+
case channelTypes.enum.tiktok:
104+
return inbox.integrationTiktok?.name ?? null
103105
case channelTypes.enum.telegram:
104106
return inbox.integrationTelegram?.name ?? null
105107
case channelTypes.enum.webchat:

0 commit comments

Comments
 (0)