Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Add room intro warning when e2ee is not enabled #5929

Merged
merged 8 commits into from
Jun 10, 2021

Conversation

germain-gg
Copy link
Contributor

Fixes element-hq/element-web#15675

Screen Shot 2021-04-27 at 14 43 19

This message is triggered as part of RoomIntro (it will be more visible once #5887 lands) and only is displayed if:

  • It is a private room
  • The server is configured so that private conversation should be encrypted by default
  • The current room is not encrypted

@matrix-org/design keen to hear your thoughts on this as I could not find any "inline" alert to explain a potentially dangerous action. Everything happens in a modal which seemed too intrusive for this scenario in my opinion.
More than happy to tweak this to make sure that it provides the most consistent experience possible

@germain-gg germain-gg requested review from a team April 27, 2021 13:53
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine code wise, though I suspect Design will want to tweak this one way or another.

@nadonomy
Copy link
Contributor

nadonomy commented Jun 3, 2021

@gsouquet after exploring some options I ended up arriving at this:

https://www.figma.com/file/ccOtQyqevLDXE6UktupgN3/E2E-Room-Warnings?node-id=4%3A3188

It made sense to me to use the same contextual warnings we do to communicate encryption state, and by persisting it's place in the timeline we can afford to be more verbose in the copy, which let's us (1) build trust & confidence (2) not alarm the user & (3) offer help on how to remedy.

Let me know if you have any thoughts!

@germain-gg
Copy link
Contributor Author

Here is a screenshot of the implementation on Element Web (cc @nadonomy)

Screen Shot 2021-06-10 at 11 15 29

@germain-gg germain-gg requested a review from jryans June 10, 2021 10:18
@nadonomy
Copy link
Contributor

@gsouquet thanks! This is looking great.

I have some copy requests actually with the benefit of fresh eyes. 😀 Able to make the language more terse and front-load sentiment clearer.

Would you mind updating the title to:

End-to-end encryption isn't enabled

And then the body copy to:

Your private messages are normally encrypted, but this room isn't. Usually this is due to an unsupported device or method being used, like email invites. Enable encryption in Settings.

src/components/views/rooms/NewRoomIntro.tsx Outdated Show resolved Hide resolved
Co-authored-by: J. Ryan Stinnett <jryans@gmail.com>
@germain-gg germain-gg merged commit 88e337b into develop Jun 10, 2021
@germain-gg germain-gg deleted the gsouquet-e2ee-warning branch June 10, 2021 13:58
import { ROOM_SECURITY_TAB } from "../dialogs/RoomSettingsDialog";

function hasExpectedEncryptionSettings(room): boolean {
const isEncrypted: boolean = room._client?.isRoomEncrypted(room.roomId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we please avoid relying on internal/private fields, it makes Typescript conversions that bit riskier. Not so bad here as TS caught it but if it was in JS 💥

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Loudly warn if you are DMing a user who has no E2EE capable devices
4 participants