Compare commits

...

2 Commits

Author SHA1 Message Date
David Langley
384147c94b Try again to fix calParticipants 2025-08-27 15:15:41 +01:00
David Langley
0652d77610 fix useParticipants incorrectly returning an array when a map is expected 2025-08-27 14:55:13 +01:00

View File

@@ -42,10 +42,11 @@ export const useConnectionState = (call: Call | null): ConnectionState =>
);
export const useParticipants = (call: Call | null): Map<RoomMember, Set<string>> => {
const participants = call?.participants;
return useTypedEventEmitterState(
call ?? undefined,
CallEvent.Participants,
useCallback((state) => state ?? call?.participants ?? [], [call]),
useCallback((state) => state ?? participants ?? new Map(), [participants]),
);
};