Fix subjects for emails for Optin Bookings (#5148)

* Fix subject for manually confirmed booking

* Fix subject for request email to attendee

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Hariom Balhara 2022-10-25 13:02:05 +05:30 committed by GitHub
parent 68ae3c48a0
commit 00c3e9680c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -18,7 +18,7 @@ export default class AttendeeRequestEmail extends AttendeeScheduledEmail {
to: toAddresses.join(","),
subject: `${this.calEvent.organizer.language.translate("booking_submitted_subject", {
eventType: this.calEvent.type,
name: this.calEvent.attendees[0].name,
name: this.calEvent.team?.name || this.calEvent.organizer.name,
date: this.getFormattedDate(),
})}`,
html: renderEmail("AttendeeRequestEmail", {

View File

@ -441,6 +441,7 @@ export const bookingsRouter = createProtectedRouter()
select: {
id: true,
recurringEvent: true,
title: true,
requiresConfirmation: true,
workflows: {
include: {
@ -525,7 +526,7 @@ export const bookingsRouter = createProtectedRouter()
const attendeesList = await Promise.all(attendeesListPromises);
const evt: CalendarEvent = {
type: booking.title,
type: booking.eventType?.title || booking.title,
title: booking.title,
description: booking.description,
customInputs: isPrismaObjOrUndefined(booking.customInputs),