You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Pause ringing more aggressively
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -886,6 +886,8 @@ export default class CallHandler extends EventEmitter {
|
|||||||
break;
|
break;
|
||||||
case 'hangup':
|
case 'hangup':
|
||||||
case 'reject':
|
case 'reject':
|
||||||
|
this.stopRingingIfPossible(this.calls.get(payload.room_id).callId);
|
||||||
|
|
||||||
if (!this.calls.get(payload.room_id)) {
|
if (!this.calls.get(payload.room_id)) {
|
||||||
return; // no call to hangup
|
return; // no call to hangup
|
||||||
}
|
}
|
||||||
@@ -898,11 +900,15 @@ export default class CallHandler extends EventEmitter {
|
|||||||
// the hangup event away)
|
// the hangup event away)
|
||||||
break;
|
break;
|
||||||
case 'hangup_all':
|
case 'hangup_all':
|
||||||
|
this.stopRingingIfPossible(this.calls.get(payload.room_id).callId);
|
||||||
|
|
||||||
for (const call of this.calls.values()) {
|
for (const call of this.calls.values()) {
|
||||||
call.hangup(CallErrorCode.UserHangup, false);
|
call.hangup(CallErrorCode.UserHangup, false);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'answer': {
|
case 'answer': {
|
||||||
|
this.stopRingingIfPossible(this.calls.get(payload.room_id).callId);
|
||||||
|
|
||||||
if (!this.calls.has(payload.room_id)) {
|
if (!this.calls.has(payload.room_id)) {
|
||||||
return; // no call to answer
|
return; // no call to answer
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user