Reject new incoming calls when a call is in progress.
This commit is contained in:
@@ -1783,12 +1783,18 @@ class TinodeWeb extends React.Component {
|
|||||||
switch (info.event) {
|
switch (info.event) {
|
||||||
case 'invite':
|
case 'invite':
|
||||||
if (info.from != this.state.myUserId) {
|
if (info.from != this.state.myUserId) {
|
||||||
// Incoming call.
|
if (this.state.callState == CALL_STATE_NONE) {
|
||||||
this.setState({
|
// Incoming call.
|
||||||
callTopic: info.src,
|
this.setState({
|
||||||
callState: CALL_STATE_INCOMING_RECEIVED,
|
callTopic: info.src,
|
||||||
callSeq: info.seq
|
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;
|
break;
|
||||||
case 'accept':
|
case 'accept':
|
||||||
|
|||||||
Reference in New Issue
Block a user