Reject new incoming calls when a call is in progress.

This commit is contained in:
aforge
2022-06-27 18:26:21 +03:00
parent e77e8441cf
commit c7c2cffbbf
+12 -6
View File
@@ -1783,12 +1783,18 @@ class TinodeWeb extends React.Component {
switch (info.event) {
case 'invite':
if (info.from != this.state.myUserId) {
// Incoming call.
this.setState({
callTopic: info.src,
callState: CALL_STATE_INCOMING_RECEIVED,
callSeq: info.seq
});
if (this.state.callState == CALL_STATE_NONE) {
// Incoming call.
this.setState({
callTopic: info.src,
callState: CALL_STATE_INCOMING_RECEIVED,
callSeq: info.seq
});
} else {
// Another call is either in progress or being established.
// Reject the incoming call.
this.handleCallHangup(info.src, info.seq);
}
}
break;
case 'accept':