Provide a labs flag for encrypted state events (MSC3414) (#31513)

Signed-off-by: Skye Elliot <actuallyori@gmail.com>
Co-authored-by: Skye Elliot <actuallyori@gmail.com>
This commit is contained in:
Andy Balaam
2025-12-18 14:45:52 +00:00
committed by GitHub
parent 6f0369e623
commit ff3f069122
14 changed files with 858 additions and 26 deletions

View File

@@ -72,6 +72,20 @@ describe("EncryptionEvent", () => {
);
});
it("should show the expected texts for experimental state event encryption", async () => {
client.enableEncryptedStateEvents = true;
event.event.content!["io.element.msc4362.encrypt_state_events"] = true;
renderEncryptionEvent(client, event);
await waitFor(() =>
checkTexts(
"Experimental state encryption enabled",
"Messages and state events in this room are end-to-end encrypted. " +
"When people join, you can verify them in their profile, " +
"just tap on their profile picture.",
),
);
});
describe("with same previous algorithm", () => {
beforeEach(() => {
jest.spyOn(event, "getPrevContent").mockReturnValue({