Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Don't use m.call for Jitsi video rooms #8223

Merged
merged 1 commit into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/structures/RoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
};

private getMainSplitContentType = (room: Room) => {
if (SettingsStore.getValue("feature_video_rooms") && room.isCallRoom()) {
if (SettingsStore.getValue("feature_video_rooms") && room.isElementVideoRoom()) {
return MainSplitContentType.Video;
}
if (WidgetLayoutStore.instance.hasMaximisedWidget(room)) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/structures/SpaceRoomView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ const SpaceLandingAddButton = ({ space }) => {
e.stopPropagation();
closeMenu();

if (await showCreateNewRoom(space, RoomType.UnstableCall)) {
if (await showCreateNewRoom(space, RoomType.ElementVideo)) {
defaultDispatcher.fire(Action.UpdateSpaceHierarchy);
}
}}
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/context_menus/RoomContextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const RoomContextMenu = ({ room, onFinished, ...props }: IProps) => {
}

const isDm = DMRoomMap.shared().getUserIdForRoomId(room.roomId);
const isVideoRoom = useFeatureEnabled("feature_video_rooms") && room.isCallRoom();
const isVideoRoom = useFeatureEnabled("feature_video_rooms") && room.isElementVideoRoom();

let inviteOption: JSX.Element;
if (room.canInvite(cli.getUserId()) && !isDm) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/dialogs/CreateRoomDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
});

render() {
const isVideoRoom = this.props.type === RoomType.UnstableCall;
const isVideoRoom = this.props.type === RoomType.ElementVideo;

let aliasField;
if (this.state.joinRule === JoinRule.Public) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/right_panel/RoomSummaryCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, onClose }) => {
const isRoomEncrypted = useIsEncrypted(cli, room);
const roomContext = useContext(RoomContext);
const e2eStatus = roomContext.e2eStatus;
const isVideoRoom = useFeatureEnabled("feature_video_rooms") && room.isCallRoom();
const isVideoRoom = useFeatureEnabled("feature_video_rooms") && room.isElementVideoRoom();

const alias = room.getCanonicalAlias() || room.getAltAliases()[0] || "";
const header = <React.Fragment>
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/rooms/RoomList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ const UntaggedAuxButton = ({ tabIndex }: IAuxButtonProps) => {
e.preventDefault();
e.stopPropagation();
closeMenu();
showCreateNewRoom(activeSpace, RoomType.UnstableCall);
showCreateNewRoom(activeSpace, RoomType.ElementVideo);
}}
disabled={!canAddRooms}
tooltip={canAddRooms ? undefined
Expand Down Expand Up @@ -289,7 +289,7 @@ const UntaggedAuxButton = ({ tabIndex }: IAuxButtonProps) => {
closeMenu();
defaultDispatcher.dispatch({
action: "view_create_room",
type: RoomType.UnstableCall,
type: RoomType.ElementVideo,
});
}}
/> }
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/rooms/RoomListHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ const RoomListHeader = ({ onVisibilityChange }: IProps) => {
onClick={(e) => {
e.preventDefault();
e.stopPropagation();
showCreateNewRoom(activeSpace, RoomType.UnstableCall);
showCreateNewRoom(activeSpace, RoomType.ElementVideo);
closePlusMenu();
}}
/> }
Expand Down Expand Up @@ -310,7 +310,7 @@ const RoomListHeader = ({ onVisibilityChange }: IProps) => {
e.stopPropagation();
defaultDispatcher.dispatch({
action: "view_create_room",
type: RoomType.UnstableCall,
type: RoomType.ElementVideo,
});
closePlusMenu();
}}
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/rooms/RoomTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default class RoomTile extends React.PureComponent<IProps, IState> {

this.notificationState = RoomNotificationStateStore.instance.getRoomState(this.props.room);
this.roomProps = EchoChamber.forRoom(this.props.room);
this.isVideoRoom = SettingsStore.getValue("feature_video_rooms") && this.props.room.isCallRoom();
this.isVideoRoom = SettingsStore.getValue("feature_video_rooms") && this.props.room.isElementVideoRoom();
}

private onRoomNameUpdate = (room: Room) => {
Expand Down
4 changes: 2 additions & 2 deletions src/createRoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export default async function createRoom(opts: IOpts): Promise<string | null> {
};

// In video rooms, allow all users to send video member updates
if (opts.roomType === RoomType.UnstableCall) {
if (opts.roomType === RoomType.ElementVideo) {
createOpts.power_level_content_override = {
events: {
[VIDEO_CHANNEL_MEMBER]: 0,
Expand Down Expand Up @@ -263,7 +263,7 @@ export default async function createRoom(opts: IOpts): Promise<string | null> {
}
}).then(() => {
// Set up video rooms with a Jitsi widget
if (opts.roomType === RoomType.UnstableCall) {
if (opts.roomType === RoomType.ElementVideo) {
return addVideoChannel(roomId, createOpts.name);
}
}).then(function() {
Expand Down
2 changes: 1 addition & 1 deletion test/components/views/rooms/RoomTile-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe("RoomTile", () => {

describe("video rooms", () => {
const room = mkRoom(cli, "!1:example.org");
room.isCallRoom.mockReturnValue(true);
room.isElementVideoRoom.mockReturnValue(true);

it("tracks connection state", () => {
const tile = mount(
Expand Down
2 changes: 1 addition & 1 deletion test/test-utils/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ export function mkStubRoom(roomId: string = null, name: string, client: MatrixCl
getAvatarUrl: () => 'mxc://avatar.url/room.png',
getMxcAvatarUrl: () => 'mxc://avatar.url/room.png',
isSpaceRoom: jest.fn().mockReturnValue(false),
isCallRoom: jest.fn().mockReturnValue(false),
isElementVideoRoom: jest.fn().mockReturnValue(false),
getUnreadNotificationCount: jest.fn(() => 0),
getEventReadUpTo: jest.fn(() => null),
getCanonicalAlias: jest.fn(),
Expand Down