Revert "Start a conference in a room with 2 people + invitee rather than a 1:1 call (#7557)" (#7641)
This reverts commit 8ced6e6117
.
This commit is contained in:
parent
8e4ced6454
commit
225f8940c9
2 changed files with 3 additions and 6 deletions
|
@ -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,
|
// We leave the check for whether there's already a call in this room until later,
|
||||||
// otherwise it can race.
|
// otherwise it can race.
|
||||||
|
|
||||||
const joinedMemberCount = room.getJoinedMemberCount();
|
const members = room.getJoinedMembers();
|
||||||
const invitedAndJoinedMemberCount = room.getInvitedAndJoinedMemberCount();
|
if (members.length <= 1) {
|
||||||
if (joinedMemberCount <= 1) {
|
|
||||||
Modal.createTrackedDialog('Call Handler', 'Cannot place call with self', ErrorDialog, {
|
Modal.createTrackedDialog('Call Handler', 'Cannot place call with self', ErrorDialog, {
|
||||||
description: _t('You cannot place a call with yourself.'),
|
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}`);
|
logger.info(`Place ${type} call in ${roomId}`);
|
||||||
|
|
||||||
this.placeMatrixCall(roomId, type, transferee);
|
this.placeMatrixCall(roomId, type, transferee);
|
||||||
|
|
|
@ -54,8 +54,6 @@ function mkStubDM(roomId, userId) {
|
||||||
getMxcAvatarUrl: () => 'mxc://avatar.url/image.png',
|
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;
|
room.currentState.getMembers = room.getJoinedMembers;
|
||||||
|
|
||||||
return room;
|
return room;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue