mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 09:46:09 +03:00
Don't place another call if there's already one ongoing
The 'call' button doesn't turn into a hangup button as soon as there's a call in the room, but we should have been doing this anyway.
This commit is contained in:
parent
77cf4cf7a4
commit
d8483ddf0d
2 changed files with 10 additions and 0 deletions
|
@ -706,6 +706,14 @@ export default class CallHandler {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this.getCallForRoom(room.roomId)) {
|
||||
Modal.createTrackedDialog('Call Handler', 'Existing Call with user', ErrorDialog, {
|
||||
title: _t('Already in call'),
|
||||
description: _t("You're already in a call with this person."),
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const members = room.getJoinedMembers();
|
||||
if (members.length <= 1) {
|
||||
Modal.createTrackedDialog('Call Handler', 'Cannot place call with self', ErrorDialog, {
|
||||
|
|
|
@ -58,6 +58,8 @@
|
|||
"You cannot place VoIP calls in this browser.": "You cannot place VoIP calls in this browser.",
|
||||
"Too Many Calls": "Too Many Calls",
|
||||
"You've reached the maximum number of simultaneous calls.": "You've reached the maximum number of simultaneous calls.",
|
||||
"Already in call": "Already in call",
|
||||
"You're already in a call with this person.": "You're already in a call with this person.",
|
||||
"You cannot place a call with yourself.": "You cannot place a call with yourself.",
|
||||
"Call in Progress": "Call in Progress",
|
||||
"A call is currently being placed!": "A call is currently being placed!",
|
||||
|
|
Loading…
Reference in a new issue