I’m building an online classroom and I’d like to check class attendance via Zoom Webhooks.
Everything works quite smoothly with the meeting.participant_joined and meeting.participant_left events, but I ran into the following edge case:
In chronological order:
- User A Joins - Webhooks gets delivered correctly, I mark A as “joined”
- User A Leaves - Webhooks get delivered but my app is slow and does not return within 3 seconds. On my side the action is executed correctly and I mark A as “left”
- User A Joins again - Webhhoks get delivered, I mark A as “joined” again
- Zoom redelivers the User A meeting.participant_left, I mark A as “left” but in fact she is still on the conference
At this point I need to detect that the last delivery is a duplicate and discard it.
Few options I thought about:
- Dedupe using the x-zm-trackingid. The documentation say that it is the “Unique identifier that Zoom uses to identify the request.” but I’m not sure if that would be the same across different delivery attempts. Anyone knows?
- Look at the “left_time” value in the payload and do not mark A as “left” since the “join_time” is more recent
- Dedupe based on event_ts, though it could be error prone under heavy load
Anyone else dealing with the same problem? How did you solve it?