mirror of
https://github.com/livekit/livekit.git
synced 2026-04-25 09:02:11 +00:00
* fix: ensure num_participants is accurate in webhook events (#4265) Three fixes for stale/incorrect num_participants in webhook payloads: 1. Move participant map insertion before MarkDirty in join path so updateProto() counts the new participant. 2. Use fresh room.ToProto() for participant_joined webhook instead of a stale snapshot captured at session start. 3. Remove direct NumParticipants-- in leave path (inconsistent with updateProto's IsDependent check), force immediate proto update, and wait for completion before triggering onClose callbacks. * fix: use ToProtoConsistent for webhook events instead of forcing immediate updates