Do not send ParticipantJoined webhook if connection was resumed (#1795)

* Do not send ParticipantJoined webhook if connection was resumed

* isResume -> isMigration
This commit is contained in:
David Zhao
2023-06-15 15:39:04 -07:00
committed by GitHub
parent 0dab55556d
commit f71544e27a
5 changed files with 32 additions and 22 deletions
+9 -6
View File
@@ -91,14 +91,17 @@ func (t *telemetryService) ParticipantActive(
room *livekit.Room,
participant *livekit.ParticipantInfo,
clientMeta *livekit.AnalyticsClientMeta,
isMigration bool,
) {
t.enqueue(func() {
// consider participant joined only when they became active
t.NotifyEvent(ctx, &livekit.WebhookEvent{
Event: webhook.EventParticipantJoined,
Room: room,
Participant: participant,
})
if !isMigration {
// consider participant joined only when they became active
t.NotifyEvent(ctx, &livekit.WebhookEvent{
Event: webhook.EventParticipantJoined,
Room: room,
Participant: participant,
})
}
worker, ok := t.getWorker(livekit.ParticipantID(participant.Sid))
if !ok {