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

Handle group call redaction (#3231)

Redacted group call events should be interpreted as terminated calls.
This commit is contained in:
Robin
2023-03-28 09:07:44 -04:00
committed by GitHub
parent 6861c67f56
commit d48b19e052
3 changed files with 43 additions and 5 deletions

View File

@ -582,6 +582,7 @@ export function makeMockGroupCallStateEvent(
"m.type": GroupCallType.Video,
"m.intent": GroupCallIntent.Prompt,
},
redacted?: boolean,
): MatrixEvent {
return {
getType: jest.fn().mockReturnValue(EventType.GroupCallPrefix),
@ -589,6 +590,7 @@ export function makeMockGroupCallStateEvent(
getTs: jest.fn().mockReturnValue(0),
getContent: jest.fn().mockReturnValue(content),
getStateKey: jest.fn().mockReturnValue(groupCallId),
isRedacted: jest.fn().mockReturnValue(redacted ?? false),
} as unknown as MatrixEvent;
}