Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attendeeSeatId is not being returned on webhook response for events with seats. #15010

Closed
xandyalexandrec opened this issue May 13, 2024 · 3 comments · Fixed by #15184
Closed
Labels
🐛 bug Something isn't working Medium priority Created by Linear-GitHub Sync seats area: seats, guest meetings, multiple people webhooks area: webhooks, callback, webhook payload

Comments

@xandyalexandrec
Copy link

Issue Summary

attendeeSeatId is not being returned on webhook response for events with seats. The value is only returned when the first attendee register for the event, following attendees do not have this value returned.

Steps to Reproduce

  1. Create an event that offer seats.
  2. Configure a webhook for when a user register for an event.
  3. Register for this event.
  4. Register with another email for this event.
  5. Check the webhook responses and check that the attendeeSeatId is not returned for the second attendee.

Actual Results

  • It does not return attendeeSeatId in the webhook response

Expected Results

  • It should return attendeeSeatId in the webhook response
@xandyalexandrec xandyalexandrec changed the title attendeeSeatId is not being returned on webhook response for events **with seats**. attendeeSeatId is not being returned on webhook response for events with seats. May 13, 2024
Copy link

dosubot bot commented May 13, 2024

The issue with attendeeSeatId not being returned in the webhook response for events with seats, except for the first attendee, likely stems from how the attendeeSeatId is handled and included in the webhook response. The attendeeSeatId is generated within the createNewSeat function, which assigns a unique ID to each attendee's seat. However, for this ID to be included in the webhook response for all attendees, it must be properly incorporated into the response object.

The webhook response is constructed in functions like sendPayload and sendGenericWebhookPayload, which may need to be reviewed to ensure they include the attendeeSeatId from the event (evt) object for each attendee. If the logic to include attendeeSeatId for each attendee in the webhook response is missing or not correctly implemented, it would result in the observed behavior where only the first attendee's attendeeSeatId is returned.

To resolve this, you should verify that the evt object, including the attendeeSeatId, is correctly included in the data structure sent in the webhook response. This might involve modifying the code that constructs the webhook response to explicitly include the attendeeSeatId for each attendee, based on the updated evt object.

For more details, you can refer to the implementation in the createNewSeat.ts and sendPayload.ts files within the repository. This should guide you in making the necessary adjustments to ensure that attendeeSeatId is returned in the webhook response for all attendees.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@dosubot dosubot bot added seats area: seats, guest meetings, multiple people webhooks area: webhooks, callback, webhook payload 🐛 bug Something isn't working labels May 13, 2024
@xandyalexandrec
Copy link
Author

As we can see in this part of the code, the attendeeSeatId is not retuned.
https://github.com/calcom/cal.com/blob/main/packages/features/bookings/lib/handleSeats/handleSeats.ts#L117-L133

Copy link

dosubot bot commented May 13, 2024

To address the issue where attendeeSeatId is not included in the webhook response for all attendees beyond the first one, you'll need to make adjustments in the code where the webhook response is prepared. Specifically, ensure that each attendee's unique seat ID is generated, assigned, and included in the webhook response data.

  1. Generate and Assign a Unique ID for Each Attendee's Seat: The createNewSeat function already generates a unique ID (attendeeUniqueId) for the new attendee's seat. Make sure this process is applied consistently for every attendee added to the booking.

  2. Include the Unique ID in the Webhook Response: Modify the webhook response construction to include the attendeeSeatId for each attendee. If the response is structured to handle only a single attendee's seat ID, you'll need to update it to accommodate multiple attendees, ensuring each attendeeSeatId is included.

  3. Adjust the Data Structure for Multiple Attendees: The webhook response should be structured in a way that supports multiple attendees and their respective seat IDs. This may involve iterating over all attendees in the booking and including their attendeeSeatId in the response data.

By following these steps and adjusting the relevant sections of your code, you can ensure that the attendeeSeatId is correctly included in the webhook response for every attendee, not just the first one. This will likely involve changes to how the webhook response data is compiled and structured, especially to support events with multiple attendees.

Ensure to test these changes thoroughly to confirm that the attendeeSeatId is correctly included in the webhook responses for all attendees and that no new issues are introduced.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working Medium priority Created by Linear-GitHub Sync seats area: seats, guest meetings, multiple people webhooks area: webhooks, callback, webhook payload
Projects
None yet
2 participants