From 46170eb5d38090f770faffa895425ffc71f5bcf3 Mon Sep 17 00:00:00 2001 From: talksik Date: Wed, 15 Apr 2026 11:02:47 -0700 Subject: [PATCH] fix: prevent writing to nonexistent firestore docs Using the same livekit project means we may receive events for another environment, though we should eventually separate the environments. --- go/internal/handler/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/internal/handler/handler.go b/go/internal/handler/handler.go index d6d90e8..85feeec 100644 --- a/go/internal/handler/handler.go +++ b/go/internal/handler/handler.go @@ -1132,7 +1132,7 @@ func (h *Handler) HandleLivekitWebhook(w http.ResponseWriter, r *http.Request) { _, err = docRef.Update(ctx, []firestore.Update{ {Path: "huddle_active_participants", Value: participantIds}, - }) + }, firestore.Exists) if err != nil { slog.Error("failed to update huddle participants in firestore", "error", err, "path", docPath) }