diff --git a/src/eventHandlers/InterviewEventHandler.js b/src/eventHandlers/InterviewEventHandler.js index 99970915..c6e625da 100644 --- a/src/eventHandlers/InterviewEventHandler.js +++ b/src/eventHandlers/InterviewEventHandler.js @@ -259,7 +259,7 @@ async function sendInterviewRescheduledNotifications (payload) { const data = await notificationsSchedulerService.getDataForInterview(interviewEntity) if (!data) { return } - await updateZoomMeeting(interviewEntity.startTimestamp, interviewEntity.duration, interviewEntity.zoomAccountApiKey, interviewEntity.zoomMeetingId) + await updateZoomMeeting(interviewEntity.startTimestamp, interviewEntity.duration, interviewEntity.zoomAccountApiKey, interviewEntity.zoomMeetingId, interviewEntity.guestTimezone || interviewEntity.hostTimezone) const interviewCancelLink = `${config.TAAS_APP_BASE_URL}/interview/${interview.id}/cancel` const interviewRescheduleLink = `${config.TAAS_APP_BASE_URL}/interview/${interview.id}/reschedule` diff --git a/src/services/ZoomService.js b/src/services/ZoomService.js index d1edb64c..4d6ff4d3 100644 --- a/src/services/ZoomService.js +++ b/src/services/ZoomService.js @@ -121,14 +121,16 @@ async function generateZoomMeetingLink (startTime, duration, timezone) { * @param {Integer} duration the duration of the meeting * @param {String} apiKey zoom account api key * @param {Integer} zoomMeetingId zoom meeting id + * @param {String} timezone the timezone of the meeting * @returns {undefined} */ -async function updateZoomMeeting (startTime, duration, zoomAccountApiKey, zoomMeetingId) { +async function updateZoomMeeting (startTime, duration, zoomAccountApiKey, zoomMeetingId, timezone) { const { accessToken } = await generateZoomJWTBearerAccessToken(zoomAccountApiKey) // PATCH request details in Zoom API docs: // https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingupdate await axios.patch(`https://api.zoom.us/v2/meetings/${zoomMeetingId}`, { start_time: startTime.toISOString(), + timezone, duration }, { headers: {