Skip to content

Commit

Permalink
feature: Allow handlebars usage in PushTemplate (#567)
Browse files Browse the repository at this point in the history
  • Loading branch information
PRZzz authored Dec 4, 2024
1 parent 20b12b9 commit cf2c86e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/platform/src/render/Template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,16 @@ export class PushTemplate extends Template {
return body
}, {} as Record<string, any>)

const renderedUrl = Render(this.url, variables)
const url = project.link_wrap_push
? paramsToEncodedLink({
userId: user.id,
campaignId: context.campaign_id,
referenceId: context.reference_id,
redirect: this.url,
redirect: renderedUrl,
path: 'c',
})
: this.url
: renderedUrl

return {
topic: this.topic,
Expand Down

0 comments on commit cf2c86e

Please sign in to comment.