Skip to content

Commit ed6d4e5

Browse files
authored
Merge pull request #1647 from SimonBrandner/dont-send-hangup
Don't send m.call.hangup if m.call.invite wasn't sent either
2 parents accfa32 + b6ef8d9 commit ed6d4e5

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)