1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-07-31 15:24:23 +03:00

Let leave requests outlive the window

This commit is contained in:
Robin Townsend
2022-10-26 17:50:20 -04:00
parent 13c751c060
commit dbdaa1540a
5 changed files with 35 additions and 5 deletions

View File

@ -212,12 +212,32 @@ describe('Group Call', function() {
],
}),
FAKE_USER_ID_1,
false,
);
} finally {
groupCall.leave();
}
});
it("sends member state event to room on leave", async () => {
room.currentState.members[FAKE_USER_ID_1] = {
userId: FAKE_USER_ID_1,
} as unknown as RoomMember;
await groupCall.create();
await groupCall.enter();
mockSendState.mockClear();
groupCall.leave();
expect(mockSendState).toHaveBeenCalledWith(
FAKE_ROOM_ID,
EventType.GroupCallMemberPrefix,
expect.objectContaining({ "m.calls": [] }),
FAKE_USER_ID_1,
true, // Request should outlive the window
);
});
it("starts with mic unmuted in regular calls", async () => {
try {
await groupCall.create();