Use a different error message for UTDs when you weren't in the room. (#12453)
* Use different messages for UTDs sent before login * Playwright test for historical events * Add some tests * initial work on pre-join UTDs * add playwright tests and remove old pre-join UTD logic * run i18n script * fix type error * use different error code in PostHog for pre-join UTD * don't remove old pre-join UTD logic yet --------- Co-authored-by: Richard van der Hoff <richard@matrix.org>
This commit is contained in:
parent
9cc362e950
commit
d5bf1022e9
7 changed files with 84 additions and 33 deletions
|
@ -100,4 +100,18 @@ describe("DecryptionFailureBody", () => {
|
|||
);
|
||||
},
|
||||
);
|
||||
|
||||
it("should handle undecryptable pre-join messages", async () => {
|
||||
// When
|
||||
const event = await mkDecryptionFailureMatrixEvent({
|
||||
code: DecryptionFailureCode.HISTORICAL_MESSAGE_USER_NOT_JOINED,
|
||||
msg: "Not joined",
|
||||
roomId: "fakeroom",
|
||||
sender: "fakesender",
|
||||
});
|
||||
const { container } = customRender(event);
|
||||
|
||||
// Then
|
||||
expect(container).toHaveTextContent("You don't have access to this message");
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue