You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
A hangup from another client is still valid
if we're in the ringing state Fixes https://github.com/vector-im/element-web/issues/15933
This commit is contained in:
@@ -1266,13 +1266,12 @@ export class MatrixCall extends EventEmitter {
|
||||
|
||||
// party ID must match (our chosen partner hanging up the call) or be undefined (we haven't chosen
|
||||
// a partner yet but we're treating the hangup as a reject as per VoIP v0)
|
||||
if (!this.partyIdMatches(msg) && this.opponentPartyId !== undefined) {
|
||||
if (this.partyIdMatches(msg) || this.opponentPartyId === undefined || this.state === CallState.Ringing) {
|
||||
// default reason is user_hangup
|
||||
this.terminate(CallParty.Remote, msg.reason || CallErrorCode.UserHangup, true);
|
||||
} else {
|
||||
logger.info(`Ignoring message from party ID ${msg.party_id}: our partner is ${this.opponentPartyId}`);
|
||||
return;
|
||||
}
|
||||
|
||||
// default reason is user_hangup
|
||||
this.terminate(CallParty.Remote, msg.reason || CallErrorCode.UserHangup, true);
|
||||
};
|
||||
|
||||
onRejectReceived = (msg) => {
|
||||
|
||||
Reference in New Issue
Block a user