Skip to content

Commit b6ef8d9

Browse files
committed
Don't send hangup if invite wasn't sent
Signed-off-by: Šimon Brandner <[email protected]>
1 parent f34052f commit b6ef8d9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/webrtc/call.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,8 @@ export class MatrixCall extends EventEmitter {
660660

661661
logger.debug("Ending call " + this.callId);
662662
this.terminate(CallParty.Local, reason, !suppressEvent);
663+
// We don't want to send hangup here if we didn't even get to sending an invite
664+
if (this.state === CallState.WaitLocalMedia) return;
663665
const content = {};
664666
// Continue to send no reason for user hangups temporarily, until
665667
// clients understand the user_hangup reason (voip v1)

0 commit comments

Comments
 (0)