Open source video conferencing app powered by LiveKit. Built with Django and React.
π(frontend) track missing lobby participant on accept/reject
lebaudantoine7844dfcc12e7
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 7d978995..319b8b18 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -14,6 +14,7 @@ and this project adheres to- β¨(backend) add Traefik support via configurable media-auth url header #1649- β¨(backend) update a room's attributes from the external API- π(backend) log request duration in Gunicorn workers+- π(frontend) track missing lobby participant on accept/reject### Changeddiff --git a/src/frontend/src/features/participants/api/enterRoom.ts b/src/frontend/src/features/participants/api/enterRoom.tsindex 2c8c618a..80d70d3a 100644--- a/src/frontend/src/features/participants/api/enterRoom.ts+++ b/src/frontend/src/features/participants/api/enterRoom.ts@@ -1,5 +1,6 @@import { ApiError } from '@/api/ApiError'import { fetchApi } from '@/api/fetchApi'+import { captureEvent } from '@/features/analytics/telemetry'import { useMutation, type UseMutationOptions } from '@tanstack/react-query'export interface EnterRoomParams {@@ -17,13 +18,23 @@ export const enterRoom = async ({allowEntry,participantId,}: EnterRoomParams): Promise<EnterRoomResponse> => {- return await fetchApi<EnterRoomResponse>(`/rooms/${roomId}/enter/`, {- method: 'POST',- body: JSON.stringify({- participant_id: participantId,- allow_entry: allowEntry,- }),- })+ try {+ return await fetchApi<EnterRoomResponse>(`/rooms/${roomId}/enter/`, {+ method: 'POST',+ body: JSON.stringify({+ participant_id: participantId,+ allow_entry: allowEntry,+ }),+ })+ } catch (error) {+ if (error instanceof ApiError && error.statusCode === 404) {+ captureEvent('lobby_entry_participant_gone', {+ room_id: roomId,+ allow_entry: allowEntry,+ })+ }+ throw error+ }}export function useEnterRoom(