From 715690830b36c10e1daa048926bf5631a3415357 Mon Sep 17 00:00:00 2001 From: Andrew Ferrazzutti Date: Wed, 6 Nov 2024 11:40:18 -0500 Subject: [PATCH] Handle ratelimiting for non-legacy state setting Each request must be retried, as the non-legacy flow involves a sequence of requests that must resolve in order. --- src/matrixrtc/MatrixRTCSession.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/matrixrtc/MatrixRTCSession.ts b/src/matrixrtc/MatrixRTCSession.ts index 992e50695c..a317495a95 100644 --- a/src/matrixrtc/MatrixRTCSession.ts +++ b/src/matrixrtc/MatrixRTCSession.ts @@ -1049,11 +1049,8 @@ export class MatrixRTCSession extends TypedEventEmitter + this.client.sendStateEvent(this.room.roomId, EventType.GroupCallMemberPrefix, newContent, stateKey), ); // If sending state cancels your own delayed state, prepare another delayed state // TODO: Remove this once MSC4140 is stable & doesn't cancel own delayed state @@ -1093,11 +1090,13 @@ export class MatrixRTCSession extends TypedEventEmitter + this.client.sendStateEvent( + this.room.roomId, + EventType.GroupCallMemberPrefix, + {}, + this.makeMembershipStateKey(localUserId, localDeviceId), + ), ); } }