1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

Don't send hangup if invite wasn't sent

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner
2021-03-20 08:47:23 +01:00
parent f34052fd31
commit b6ef8d95cd

View File

@@ -660,6 +660,8 @@ export class MatrixCall extends EventEmitter {
logger.debug("Ending call " + this.callId); logger.debug("Ending call " + this.callId);
this.terminate(CallParty.Local, reason, !suppressEvent); this.terminate(CallParty.Local, reason, !suppressEvent);
// We don't want to send hangup here if we didn't even get to sending an invite
if (this.state === CallState.WaitLocalMedia) return;
const content = {}; const content = {};
// Continue to send no reason for user hangups temporarily, until // Continue to send no reason for user hangups temporarily, until
// clients understand the user_hangup reason (voip v1) // clients understand the user_hangup reason (voip v1)