Skip to content

Commit 242b4e7

Browse files
committed
Pause ringing more aggressively
Signed-off-by: Šimon Brandner <[email protected]>
1 parent e4f8c79 commit 242b4e7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/CallHandler.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,8 @@ export default class CallHandler extends EventEmitter {
886886
break;
887887
case 'hangup':
888888
case 'reject':
889+
this.stopRingingIfPossible(this.calls.get(payload.room_id).callId);
890+
889891
if (!this.calls.get(payload.room_id)) {
890892
return; // no call to hangup
891893
}
@@ -898,11 +900,15 @@ export default class CallHandler extends EventEmitter {
898900
// the hangup event away)
899901
break;
900902
case 'hangup_all':
903+
this.stopRingingIfPossible(this.calls.get(payload.room_id).callId);
904+
901905
for (const call of this.calls.values()) {
902906
call.hangup(CallErrorCode.UserHangup, false);
903907
}
904908
break;
905909
case 'answer': {
910+
this.stopRingingIfPossible(this.calls.get(payload.room_id).callId);
911+
906912
if (!this.calls.has(payload.room_id)) {
907913
return; // no call to answer
908914
}

0 commit comments

Comments
 (0)