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

Commit 371ccd7

Browse files
authored
Don't use m.call for Jitsi video rooms (#8223)
1 parent ba71fb1 commit 371ccd7

File tree

11 files changed

+14
-14
lines changed

11 files changed

+14
-14
lines changed

src/components/structures/RoomView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
375375
};
376376

377377
private getMainSplitContentType = (room: Room) => {
378-
if (SettingsStore.getValue("feature_video_rooms") && room.isCallRoom()) {
378+
if (SettingsStore.getValue("feature_video_rooms") && room.isElementVideoRoom()) {
379379
return MainSplitContentType.Video;
380380
}
381381
if (WidgetLayoutStore.instance.hasMaximisedWidget(room)) {

src/components/structures/SpaceRoomView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ const SpaceLandingAddButton = ({ space }) => {
347347
e.stopPropagation();
348348
closeMenu();
349349

350-
if (await showCreateNewRoom(space, RoomType.UnstableCall)) {
350+
if (await showCreateNewRoom(space, RoomType.ElementVideo)) {
351351
defaultDispatcher.fire(Action.UpdateSpaceHierarchy);
352352
}
353353
}}

src/components/views/context_menus/RoomContextMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const RoomContextMenu = ({ room, onFinished, ...props }: IProps) => {
105105
}
106106

107107
const isDm = DMRoomMap.shared().getUserIdForRoomId(room.roomId);
108-
const isVideoRoom = useFeatureEnabled("feature_video_rooms") && room.isCallRoom();
108+
const isVideoRoom = useFeatureEnabled("feature_video_rooms") && room.isElementVideoRoom();
109109

110110
let inviteOption: JSX.Element;
111111
if (room.canInvite(cli.getUserId()) && !isDm) {

src/components/views/dialogs/CreateRoomDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
221221
});
222222

223223
render() {
224-
const isVideoRoom = this.props.type === RoomType.UnstableCall;
224+
const isVideoRoom = this.props.type === RoomType.ElementVideo;
225225

226226
let aliasField;
227227
if (this.state.joinRule === JoinRule.Public) {

src/components/views/right_panel/RoomSummaryCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ const RoomSummaryCard: React.FC<IProps> = ({ room, onClose }) => {
269269
const isRoomEncrypted = useIsEncrypted(cli, room);
270270
const roomContext = useContext(RoomContext);
271271
const e2eStatus = roomContext.e2eStatus;
272-
const isVideoRoom = useFeatureEnabled("feature_video_rooms") && room.isCallRoom();
272+
const isVideoRoom = useFeatureEnabled("feature_video_rooms") && room.isElementVideoRoom();
273273

274274
const alias = room.getCanonicalAlias() || room.getAltAliases()[0] || "";
275275
const header = <React.Fragment>

src/components/views/rooms/RoomList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ const UntaggedAuxButton = ({ tabIndex }: IAuxButtonProps) => {
243243
e.preventDefault();
244244
e.stopPropagation();
245245
closeMenu();
246-
showCreateNewRoom(activeSpace, RoomType.UnstableCall);
246+
showCreateNewRoom(activeSpace, RoomType.ElementVideo);
247247
}}
248248
disabled={!canAddRooms}
249249
tooltip={canAddRooms ? undefined
@@ -289,7 +289,7 @@ const UntaggedAuxButton = ({ tabIndex }: IAuxButtonProps) => {
289289
closeMenu();
290290
defaultDispatcher.dispatch({
291291
action: "view_create_room",
292-
type: RoomType.UnstableCall,
292+
type: RoomType.ElementVideo,
293293
});
294294
}}
295295
/> }

src/components/views/rooms/RoomListHeader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ const RoomListHeader = ({ onVisibilityChange }: IProps) => {
217217
onClick={(e) => {
218218
e.preventDefault();
219219
e.stopPropagation();
220-
showCreateNewRoom(activeSpace, RoomType.UnstableCall);
220+
showCreateNewRoom(activeSpace, RoomType.ElementVideo);
221221
closePlusMenu();
222222
}}
223223
/> }
@@ -310,7 +310,7 @@ const RoomListHeader = ({ onVisibilityChange }: IProps) => {
310310
e.stopPropagation();
311311
defaultDispatcher.dispatch({
312312
action: "view_create_room",
313-
type: RoomType.UnstableCall,
313+
type: RoomType.ElementVideo,
314314
});
315315
closePlusMenu();
316316
}}

src/components/views/rooms/RoomTile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export default class RoomTile extends React.PureComponent<IProps, IState> {
123123

124124
this.notificationState = RoomNotificationStateStore.instance.getRoomState(this.props.room);
125125
this.roomProps = EchoChamber.forRoom(this.props.room);
126-
this.isVideoRoom = SettingsStore.getValue("feature_video_rooms") && this.props.room.isCallRoom();
126+
this.isVideoRoom = SettingsStore.getValue("feature_video_rooms") && this.props.room.isElementVideoRoom();
127127
}
128128

129129
private onRoomNameUpdate = (room: Room) => {

src/createRoom.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export default async function createRoom(opts: IOpts): Promise<string | null> {
129129
};
130130

131131
// In video rooms, allow all users to send video member updates
132-
if (opts.roomType === RoomType.UnstableCall) {
132+
if (opts.roomType === RoomType.ElementVideo) {
133133
createOpts.power_level_content_override = {
134134
events: {
135135
[VIDEO_CHANNEL_MEMBER]: 0,
@@ -263,7 +263,7 @@ export default async function createRoom(opts: IOpts): Promise<string | null> {
263263
}
264264
}).then(() => {
265265
// Set up video rooms with a Jitsi widget
266-
if (opts.roomType === RoomType.UnstableCall) {
266+
if (opts.roomType === RoomType.ElementVideo) {
267267
return addVideoChannel(roomId, createOpts.name);
268268
}
269269
}).then(function() {

test/components/views/rooms/RoomTile-test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ describe("RoomTile", () => {
7373

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

7878
it("tracks connection state", () => {
7979
const tile = mount(

0 commit comments

Comments
 (0)