Wrong language in emails (#1541)

* test --wip

* --wip

* --wip

* --wip

* split language into organizer-attendees

* name fix for tAttendees

* --WIP

* added attendee locale migration, --WIP

* --wip

* fixed check types --wip

* updated person language type

* test snapshot updated

* --wip

* --WIP

* --WIP

* --WIP

* test changes revert

* cleanup

* removed extra space from test

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2022-01-27 13:32:53 -07:00
1 parent 1119d7f558
commit af89de8004
26 files changed
+324 -221

No files matched your search

+4 -2
View File
@@ -4,7 +4,7 @@ import { CalendarEvent } from "@lib/integrations/calendar/interfaces/Calendar";
type ContentType = "application/json" | "application/x-www-form-urlencoded";
function applyTemplate(template: string, data: Omit<CalendarEvent, "language">, contentType: ContentType) {
function applyTemplate(template: string, data: CalendarEvent, contentType: ContentType) {
const compiled = compile(template)(data);
if (contentType === "application/json") {
return jsonParse(compiled);
@@ -25,7 +25,9 @@ const sendPayload = async (
triggerEvent: string,
createdAt: string,
subscriberUrl: string,
data: Omit<CalendarEvent, "language"> & { metadata?: { [key: string]: string } },
data: CalendarEvent & {
metadata?: { [key: string]: string };
},
template?: string | null
) => {
if (!subscriberUrl || !data) {