Handle group call redaction (#10465)

Redacted group call events should be interpreted as terminated calls.
This commit is contained in:
Robin 2023-03-28 09:16:30 -04:00 committed by GitHub
parent f1667870a0
commit edef4cc52e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 2 deletions

View file

@ -114,6 +114,14 @@ describe("CallEvent", () => {
screen.getByText("1m 30s");
});
it("shows a message if the call was redacted", () => {
const event = room.currentState.getStateEvents(MockedCall.EVENT_TYPE, "1")!;
jest.spyOn(event, "isRedacted").mockReturnValue(true);
renderEvent();
screen.getByText("Video call ended");
});
it("shows placeholder info if the call isn't loaded yet", () => {
jest.spyOn(CallStore.instance, "getCall").mockReturnValue(null);
jest.advanceTimersByTime(90000);