mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2026-02-06 10:46:46 +00:00
fix: prevent presence race condition during WebRTC handshake
Add /joining and /joined endpoints to track user join intent before WebRTC handshake completes. This prevents meetings from being deactivated while users are still connecting. - Add pending_joins Redis module with 30s TTL - Add /joining endpoint (called before WebRTC handshake) - Add /joined endpoint (called after connection established) - Check for pending joins before deactivating meetings in worker - Frontend integration with connectionId per browser tab
This commit is contained in:
@@ -807,6 +807,26 @@ export function useRoomJoinMeeting() {
|
||||
);
|
||||
}
|
||||
|
||||
// Presence race fix endpoints (not yet in OpenAPI spec)
|
||||
// These signal join intent to prevent race conditions during WebRTC handshake
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export function useMeetingJoining(): any {
|
||||
return ($api as any).useMutation(
|
||||
"post",
|
||||
"/v1/rooms/{room_name}/meetings/{meeting_id}/joining",
|
||||
{},
|
||||
);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export function useMeetingJoined(): any {
|
||||
return ($api as any).useMutation(
|
||||
"post",
|
||||
"/v1/rooms/{room_name}/meetings/{meeting_id}/joined",
|
||||
{},
|
||||
);
|
||||
}
|
||||
|
||||
export function useRoomIcsSync() {
|
||||
const { setError } = useError();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user