Skip to content

Commit

Permalink
Make onCallHangup work with focus calls
Browse files Browse the repository at this point in the history
Fixes element-hq/element-call#830

Signed-off-by: Šimon Brandner <[email protected]>
  • Loading branch information
SimonBrandner committed Jan 6, 2023
1 parent 3651dce commit 378cf79
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/webrtc/groupCall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,9 @@ export class GroupCall extends TypedEventEmitter<
private onCallHangup = (call: MatrixCall): void => {
if (call.hangupReason === CallErrorCode.Replaced) return;

const opponentUserId = call.getOpponentMember()?.userId ?? this.room.getMember(call.invitee!)!.userId;
const opponentUserId = call.invitee ?? call.getOpponentMember()?.userId;
if (!opponentUserId) return;

const deviceMap = this.calls.get(opponentUserId);

// Sanity check that this call is in fact in the map
Expand Down

0 comments on commit 378cf79

Please sign in to comment.