Skip to content

Commit

Permalink
Prevent GCal from sending update (#7920)
Browse files Browse the repository at this point in the history
* Do not send updates

* Clean up

* Clean up

* Update packages/app-store/googlecalendar/lib/CalendarService.ts

Co-authored-by: Omar López <zomars@me.com>

---------

Co-authored-by: Peer Richelsen <peeroke@gmail.com>
Co-authored-by: Omar López <zomars@me.com>
Co-authored-by: Alex van Andel <me@alexvanandel.com>
  • Loading branch information
4 people authored Mar 27, 2023
1 parent cad97f1 commit aa0e9e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/app-store/googlecalendar/lib/CalendarService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export default class GoogleCalendarService implements Calendar {
calendarId: selectedCalendar,
requestBody: payload,
conferenceDataVersion: 1,
sendUpdates: "none",
},
function (error, event) {
if (error || !event?.data) {
Expand Down Expand Up @@ -234,14 +235,13 @@ export default class GoogleCalendarService implements Calendar {
calendarId: selectedCalendar,
eventId: uid,
sendNotifications: true,
sendUpdates: "all",
sendUpdates: "none",
requestBody: payload,
conferenceDataVersion: 1,
},
function (err, evt) {
if (err) {
console.error("There was an error contacting google calendar service: ", err);

return reject(err);
}

Expand Down Expand Up @@ -293,7 +293,7 @@ export default class GoogleCalendarService implements Calendar {
calendarId: calendarId ? calendarId : defaultCalendarId,
eventId: uid,
sendNotifications: false,
sendUpdates: "all",
sendUpdates: "none",
},
function (err: GoogleCalError | null, event) {
if (err) {
Expand Down
2 changes: 1 addition & 1 deletion packages/features/bookings/lib/handleNewBooking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,7 @@ async function handler(
addVideoCallDataToEvt(originalRescheduledBooking.references);
const updateManager = await eventManager.reschedule(evt, originalRescheduledBooking.uid);

//delete orignal rescheduled booking (no seats event)
//delete original rescheduled booking (no seats event)
if (!eventType.seatsPerTimeSlot) {
await prisma.booking.delete({
where: {
Expand Down

0 comments on commit aa0e9e6

Please sign in to comment.