cal.com icon indicating copy to clipboard operation
cal.com copied to clipboard

If handling teams, we need to do more check ups for this.

Open github-actions[bot] opened this issue 1 year ago • 1 comments

https://api.github.com/calcom/cal.com/blob/afe1f5b72f6a5d6de5f7f6a473ccabad13d815b5/apps/web/pages/booking/[uid].tsx#L926


  } else {
    return;
  }
  // @TODO: If handling teams, we need to do more check ups for this.
  if (bookingInfo?.user?.id === userId) {
    return;
  }

  if (!eventType.seatsShowAttendees) {
    const seatAttendee = await prisma.bookingSeat.findFirst({
      where: {
        referenceUid: seatReferenceUid,
      },
      include: {
        attendee: {
          select: {
            name: true,
            email: true,
          },
        },
      },
    });

    if (seatAttendee) {
      const attendee = bookingInfo?.attendees?.find((a) => {
        return a.email === seatAttendee.attendee?.email;
      });
      bookingInfo["attendees"] = attendee ? [attendee] : [];
    } else {
      bookingInfo["attendees"] = [];
    }
  }
  return bookingInfo;
};

github-actions[bot] avatar Apr 21 '23 13:04 github-actions[bot]

can anyone assign this to me

shohan2001 avatar May 01 '23 10:05 shohan2001