You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-02 17:02:31 +03:00
Merge pull request #1820 from SimonBrandner/fix/hangup-reason/18219
Send `user_hangup` reason if the opponent supports it
This commit is contained in:
@@ -750,9 +750,10 @@ export class MatrixCall extends EventEmitter {
|
|||||||
// We don't want to send hangup here if we didn't even get to sending an invite
|
// We don't want to send hangup here if we didn't even get to sending an invite
|
||||||
if (this.state === CallState.WaitLocalMedia) return;
|
if (this.state === CallState.WaitLocalMedia) return;
|
||||||
const content = {};
|
const content = {};
|
||||||
// Continue to send no reason for user hangups temporarily, until
|
// Don't send UserHangup reason to older clients
|
||||||
// clients understand the user_hangup reason (voip v1)
|
if ((this.opponentVersion && this.opponentVersion >= 1) || reason !== CallErrorCode.UserHangup) {
|
||||||
if (reason !== CallErrorCode.UserHangup) content['reason'] = reason;
|
content["reason"] = reason;
|
||||||
|
}
|
||||||
this.sendVoipEvent(EventType.CallHangup, content);
|
this.sendVoipEvent(EventType.CallHangup, content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user