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

Commit

Permalink
Revert "Start a conference in a room with 2 people + invitee rather t…
Browse files Browse the repository at this point in the history
…han a 1:1 call (#7557)"

This reverts commit 8ced6e6.
  • Loading branch information
dbkr authored Jan 26, 2022
1 parent dc9b712 commit 44ac002
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/CallHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -822,13 +822,12 @@ export default class CallHandler extends EventEmitter {
// We leave the check for whether there's already a call in this room until later,
// otherwise it can race.

const joinedMemberCount = room.getJoinedMemberCount();
const invitedAndJoinedMemberCount = room.getInvitedAndJoinedMemberCount();
if (joinedMemberCount <= 1) {
const members = room.getJoinedMembers();
if (members.length <= 1) {
Modal.createTrackedDialog('Call Handler', 'Cannot place call with self', ErrorDialog, {
description: _t('You cannot place a call with yourself.'),
});
} else if (invitedAndJoinedMemberCount === 2) {
} else if (members.length === 2) {
logger.info(`Place ${type} call in ${roomId}`);

this.placeMatrixCall(roomId, type, transferee);
Expand Down
2 changes: 0 additions & 2 deletions test/CallHandler-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ function mkStubDM(roomId, userId) {
getMxcAvatarUrl: () => 'mxc://avatar.url/image.png',
},
]);
room.getJoinedMemberCount = jest.fn().mockReturnValue(room.getJoinedMembers().length);
room.getInvitedAndJoinedMemberCount = jest.fn().mockReturnValue(room.getJoinedMembers().length);
room.currentState.getMembers = room.getJoinedMembers;

return room;
Expand Down

0 comments on commit 44ac002

Please sign in to comment.