mirror of https://github.com/vector-im/riot-web
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.pull/21833/head
parent
77cf4cf7a4
commit
d8483ddf0d
|
@ -706,6 +706,14 @@ export default class CallHandler {
|
||||||
return;
|
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();
|
const members = room.getJoinedMembers();
|
||||||
if (members.length <= 1) {
|
if (members.length <= 1) {
|
||||||
Modal.createTrackedDialog('Call Handler', 'Cannot place call with self', ErrorDialog, {
|
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.",
|
"You cannot place VoIP calls in this browser.": "You cannot place VoIP calls in this browser.",
|
||||||
"Too Many Calls": "Too Many Calls",
|
"Too Many Calls": "Too Many Calls",
|
||||||
"You've reached the maximum number of simultaneous calls.": "You've reached the maximum number of simultaneous 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.",
|
"You cannot place a call with yourself.": "You cannot place a call with yourself.",
|
||||||
"Call in Progress": "Call in Progress",
|
"Call in Progress": "Call in Progress",
|
||||||
"A call is currently being placed!": "A call is currently being placed!",
|
"A call is currently being placed!": "A call is currently being placed!",
|
||||||
|
|
Loading…
Reference in New Issue