From 4ce837b20e638a185f9002b2388fbaf48975ee6e Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 17 Oct 2023 14:26:18 +0100 Subject: [PATCH] Fix sending call member events on leave (#3799) https://github.com/matrix-org/matrix-js-sdk/pull/3756 changed the membership update function to await on the next call, but this meant it never returned and therefore never cleared `updateCallMembershipRunning`. We therefore didn't send the updated call member event when leaving, instead sending it whenever the next poll interval arrived. This changes it to only await if we are retrying, not if we're just scheduling the next poll. Fixes https://github.com/vector-im/element-call/issues/1763 --- src/matrixrtc/MatrixRTCSession.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/matrixrtc/MatrixRTCSession.ts b/src/matrixrtc/MatrixRTCSession.ts index c1efe498999..ff7128435d7 100644 --- a/src/matrixrtc/MatrixRTCSession.ts +++ b/src/matrixrtc/MatrixRTCSession.ts @@ -427,7 +427,6 @@ export class MatrixRTCSession extends TypedEventEmitter setTimeout(resolve, resendDelay)); await this.triggerCallMembershipEventUpdate(); }