feat: implement CORS proxy for Matrix homeservers during development and refactor call handling logic
This commit is contained in:
@@ -56,7 +56,7 @@ import { useRoomCreators } from '../../hooks/useRoomCreators';
|
||||
import { useRoomPermissions } from '../../hooks/useRoomPermissions';
|
||||
import { InviteUserPrompt } from '../../components/invite-user-prompt';
|
||||
import { CallParticipantsIndicator } from './CallParticipantsIndicator';
|
||||
import { useCall } from '../call/useCall';
|
||||
import { useCall, useRoomCall } from '../call/useCall';
|
||||
import { CallType } from '../call/types';
|
||||
import { roomToParentsAtom } from '../../state/room/roomToParents';
|
||||
import { StateEvent } from '../../../types/matrix/room';
|
||||
@@ -75,7 +75,8 @@ const RoomNavItemMenu = forwardRef<HTMLDivElement, RoomNavItemMenuProps>(
|
||||
const unread = useRoomUnread(room.roomId, roomToUnreadAtom);
|
||||
const powerLevels = usePowerLevels(room);
|
||||
const creators = useRoomCreators(room);
|
||||
const { startCall, endCall, activeCall, callSupported } = useCall();
|
||||
const { startCall: startCallGlobal, endCall, activeCall } = useCall();
|
||||
const { callSupported } = useRoomCall(room.roomId);
|
||||
const markAsRead = useMarkAsRead(mx);
|
||||
|
||||
const permissions = useRoomPermissions(creators, powerLevels);
|
||||
@@ -119,7 +120,7 @@ const RoomNavItemMenu = forwardRef<HTMLDivElement, RoomNavItemMenuProps>(
|
||||
if (activeCall) {
|
||||
await endCall();
|
||||
}
|
||||
await startCall(room.roomId, CallType.Voice);
|
||||
await startCallGlobal(room.roomId, CallType.Voice);
|
||||
requestClose();
|
||||
} catch (error) {
|
||||
console.error('Failed to join voice call:', error);
|
||||
|
||||
Reference in New Issue
Block a user