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:
Hubert Chathi 2024-04-29 13:18:57 -04:00 committed by GitHub
parent 9cc362e950
commit d5bf1022e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 84 additions and 33 deletions

View file

@ -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");
});
});