Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct Message: Manage encrypted DM in case of invite by email #23133

Closed
2 tasks
giomfo opened this issue Aug 22, 2022 · 7 comments · Fixed by matrix-org/matrix-react-sdk#10253
Closed
2 tasks
Assignees
Labels
A-DMs A-Immutable-DMs O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience T-Enhancement

Comments

@giomfo
Copy link
Member

giomfo commented Aug 22, 2022

Your use case

Context sum up

Currently this is possible to start a new DM by filling an email address.

The resulting DM is an unencrypted room (even if the encryption should be enabled by default according to the HS well-known configuration) because there is no way to encrypt message in this room until an actual matrix account has joined the DM:
image

The purpose is to let the end user start sending messages before the invited contact creates theirs account and joins, but there is some concerns:

  • we run the risk to let people using an unencrypted DM without being aware of that
  • matrix.org allows us to create unencrypted DM, but some HS may force the encryption in the created DM. The user experience would not be good then

What would you like to do?

After discussing with Design team, we converged to the following solution:

  • When the HS promotes the encryption (via the well-known endpoint), the DM will be created by enabling the encryption. The chat composer will be disabled until a matrix account is created by using the invited email
  • In order to be able to name correctly the resulting room, only one email address will be allowed at once. The created DM will be added to the m.direct dictionary by using the email as key. The Element clients will then able to add this DM in the right people section and name it with the full email address

Here are the suggested design:
Screenshot 2022-08-22 at 18 54 42

Figma: https://www.figma.com/file/OvsSONqAyabcUDYp8tnEs6/Start-a-DM?node-id=1373%3A49380

Have you considered any alternatives?

No response

Additional context

We plan to work on a PR for this in the following weeks

@t3chguy
Copy link
Member

t3chguy commented Aug 22, 2022

The created DM will be added to the m.direct dictionary by using the email as key.

Is there an MSC to allow this? The spec says the keys are MXIDs

https://spec.matrix.org/v1.3/client-server-api/#mdirect

@weeman1337
Copy link
Contributor

At least on web, e-mail-addresses are listed in m.direct. We are probably not spec-compliant there.

@turt2live
Copy link
Member

That is indeed a bug/spec violation. Previously reported as #7484 but closed due to lack of traffic/known causes.

@t3chguy
Copy link
Member

t3chguy commented Aug 23, 2022

@weeman1337 was web the only client you ever used on the account? m.direct is obviously shared across all your devices ever

@weeman1337
Copy link
Contributor

Checked on Android. Same behaviour there.

@giomfo
Copy link
Member Author

giomfo commented Aug 23, 2022

We agree to write an MSC for supporting email addresses in m.direct event. This would at least clarify what is implemented in the current Element clients.

We should replace the email address with a mxid once known, like we did in Element-Android here

@t3chguy
Copy link
Member

t3chguy commented Aug 23, 2022

Small reminder that m.direct is on its way out with canonical DMs

@dbkr dbkr added the O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience label Aug 23, 2022
su-ex added a commit to SchildiChat/element-desktop that referenced this issue Mar 15, 2023
* Remove experimental PWA support for Firefox and Safari ([\#24630](element-hq/element-web#24630)).
* Only allow to start a DM with one email if encryption by default is enabled ([\#10253](matrix-org/matrix-react-sdk#10253)). Fixes element-hq/element-web#23133.
* DM rooms are now encrypted if encryption by default is enabled and only inviting a single email address. Any action in the result DM room will be blocked until the other has joined. ([\#10229](matrix-org/matrix-react-sdk#10229)).
* Reduce bottom margin of ReplyChain on compact modern layout ([\#8972](matrix-org/matrix-react-sdk#8972)). Fixes element-hq/element-web#22748. Contributed by @luixxiul.
* Support for v2 of MSC3903 ([\#10165](matrix-org/matrix-react-sdk#10165)). Contributed by @hughns.
* When starting a DM, existing rooms with pending third-party invites will be reused. ([\#10256](matrix-org/matrix-react-sdk#10256)). Fixes element-hq/element-web#23139.
* Polls push rules: synchronise poll rules with message rules ([\#10263](matrix-org/matrix-react-sdk#10263)). Contributed by @kerryarchibald.
* New verification request toast button labels ([\#10259](matrix-org/matrix-react-sdk#10259)).
* Remove padding around integration manager iframe ([\#10148](matrix-org/matrix-react-sdk#10148)).
* Fix block code styling in rich text editor ([\#10246](matrix-org/matrix-react-sdk#10246)). Contributed by @alunturner.
* Poll history: fetch more poll history ([\#10235](matrix-org/matrix-react-sdk#10235)). Contributed by @kerryarchibald.
* Sort short/exact emoji matches before longer incomplete matches ([\#10212](matrix-org/matrix-react-sdk#10212)). Fixes element-hq/element-web#23210. Contributed by @grimhilt.
* Poll history: detail screen ([\#10172](matrix-org/matrix-react-sdk#10172)). Contributed by @kerryarchibald.
* Provide a more detailed error message than "No known servers" ([\#6048](matrix-org/matrix-react-sdk#6048)). Fixes element-hq/element-web#13247. Contributed by @aaronraimist.
* Say when a call was answered from a different device ([\#10224](matrix-org/matrix-react-sdk#10224)).
* Widget permissions customizations using module api ([\#10121](matrix-org/matrix-react-sdk#10121)). Contributed by @maheichyk.
* Fix copy button icon overlapping with copyable text ([\#10227](matrix-org/matrix-react-sdk#10227)). Contributed by @Adesh-Pandey.
* Support joining non-peekable rooms via the module API ([\#10154](matrix-org/matrix-react-sdk#10154)). Contributed by @maheichyk.
* The "new login" toast does now display the same device information as in the settings. "No" does now open the device settings. "Yes, it was me" dismisses the toast. ([\#10200](matrix-org/matrix-react-sdk#10200)).
* Do not prompt for a password when doing a „reset all“ after login ([\#10208](matrix-org/matrix-react-sdk#10208)).
* Fix macOS notarisation using keychain credentials ([\element-hq#557](element-hq#557)).
* Let electron-builder correctly set StartupWMClass ([\element-hq#526](element-hq#526)). Fixes element-hq/element-web#13780.
* Fix incorrect copy in space creation flow ([\#10296](matrix-org/matrix-react-sdk#10296)). Fixes element-hq/element-web#24741.
* Fix space settings dialog having rogue title tooltip ([\#10293](matrix-org/matrix-react-sdk#10293)). Fixes element-hq/element-web#24740.
* Show spinner when starting a DM from the user profile (right panel) ([\#10290](matrix-org/matrix-react-sdk#10290)).
* Reduce height of toggle on expanded view source event ([\#10283](matrix-org/matrix-react-sdk#10283)). Fixes element-hq/element-web#22873. Contributed by @luixxiul.
* Pillify http and non-prefixed matrix.to links ([\#10277](matrix-org/matrix-react-sdk#10277)). Fixes element-hq/element-web#20844.
* Fix some features not being configurable via `features` ([\#10276](matrix-org/matrix-react-sdk#10276)).
* Fix starting a DM from the right panel in some cases ([\#10278](matrix-org/matrix-react-sdk#10278)). Fixes element-hq/element-web#24722.
* Align info EventTile and normal EventTile on IRC layout ([\#10197](matrix-org/matrix-react-sdk#10197)). Fixes element-hq/element-web#22782. Contributed by @luixxiul.
* Fix blowout of waveform of the voice message player on narrow UI ([\#8861](matrix-org/matrix-react-sdk#8861)). Fixes element-hq/element-web#22604. Contributed by @luixxiul.
* Fix the hidden view source toggle on IRC layout ([\#10266](matrix-org/matrix-react-sdk#10266)). Fixes element-hq/element-web#22872. Contributed by @luixxiul.
* Fix buttons on the room header being compressed due to long room name ([\#10155](matrix-org/matrix-react-sdk#10155)). Contributed by @luixxiul.
* Use the room avatar as a placeholder in calls ([\#10231](matrix-org/matrix-react-sdk#10231)).
* Fix calls showing as 'connecting' after hangup ([\#10223](matrix-org/matrix-react-sdk#10223)).
* Prevent multiple Jitsi calls started at the same time ([\#10183](matrix-org/matrix-react-sdk#10183)). Fixes element-hq/element-web#23009.
* Make localization keys compatible with agglutinative and/or SOV type languages ([\#10159](matrix-org/matrix-react-sdk#10159)). Contributed by @luixxiul.
su-ex added a commit to SchildiChat/element-web that referenced this issue Mar 15, 2023
* Remove experimental PWA support for Firefox and Safari ([\element-hq#24630](element-hq#24630)).
* Only allow to start a DM with one email if encryption by default is enabled ([\element-hq#10253](matrix-org/matrix-react-sdk#10253)). Fixes element-hq#23133.
* DM rooms are now encrypted if encryption by default is enabled and only inviting a single email address. Any action in the result DM room will be blocked until the other has joined. ([\element-hq#10229](matrix-org/matrix-react-sdk#10229)).
* Reduce bottom margin of ReplyChain on compact modern layout ([\element-hq#8972](matrix-org/matrix-react-sdk#8972)). Fixes element-hq#22748. Contributed by @luixxiul.
* Support for v2 of MSC3903 ([\element-hq#10165](matrix-org/matrix-react-sdk#10165)). Contributed by @hughns.
* When starting a DM, existing rooms with pending third-party invites will be reused. ([\element-hq#10256](matrix-org/matrix-react-sdk#10256)). Fixes element-hq#23139.
* Polls push rules: synchronise poll rules with message rules ([\element-hq#10263](matrix-org/matrix-react-sdk#10263)). Contributed by @kerryarchibald.
* New verification request toast button labels ([\element-hq#10259](matrix-org/matrix-react-sdk#10259)).
* Remove padding around integration manager iframe ([\#10148](matrix-org/matrix-react-sdk#10148)).
* Fix block code styling in rich text editor ([\element-hq#10246](matrix-org/matrix-react-sdk#10246)). Contributed by @alunturner.
* Poll history: fetch more poll history ([\element-hq#10235](matrix-org/matrix-react-sdk#10235)). Contributed by @kerryarchibald.
* Sort short/exact emoji matches before longer incomplete matches ([\element-hq#10212](matrix-org/matrix-react-sdk#10212)). Fixes element-hq#23210. Contributed by @grimhilt.
* Poll history: detail screen ([\element-hq#10172](matrix-org/matrix-react-sdk#10172)). Contributed by @kerryarchibald.
* Provide a more detailed error message than "No known servers" ([\element-hq#6048](matrix-org/matrix-react-sdk#6048)). Fixes element-hq#13247. Contributed by @aaronraimist.
* Say when a call was answered from a different device ([\element-hq#10224](matrix-org/matrix-react-sdk#10224)).
* Widget permissions customizations using module api ([\element-hq#10121](matrix-org/matrix-react-sdk#10121)). Contributed by @maheichyk.
* Fix copy button icon overlapping with copyable text ([\element-hq#10227](matrix-org/matrix-react-sdk#10227)). Contributed by @Adesh-Pandey.
* Support joining non-peekable rooms via the module API ([\element-hq#10154](matrix-org/matrix-react-sdk#10154)). Contributed by @maheichyk.
* The "new login" toast does now display the same device information as in the settings. "No" does now open the device settings. "Yes, it was me" dismisses the toast. ([\element-hq#10200](matrix-org/matrix-react-sdk#10200)).
* Do not prompt for a password when doing a „reset all“ after login ([\element-hq#10208](matrix-org/matrix-react-sdk#10208)).
* Fix incorrect copy in space creation flow ([\element-hq#10296](matrix-org/matrix-react-sdk#10296)). Fixes element-hq#24741.
* Fix space settings dialog having rogue title tooltip ([\element-hq#10293](matrix-org/matrix-react-sdk#10293)). Fixes element-hq#24740.
* Show spinner when starting a DM from the user profile (right panel) ([\element-hq#10290](matrix-org/matrix-react-sdk#10290)).
* Reduce height of toggle on expanded view source event ([\element-hq#10283](matrix-org/matrix-react-sdk#10283)). Fixes element-hq#22873. Contributed by @luixxiul.
* Pillify http and non-prefixed matrix.to links ([\element-hq#10277](matrix-org/matrix-react-sdk#10277)). Fixes element-hq#20844.
* Fix some features not being configurable via `features` ([\element-hq#10276](matrix-org/matrix-react-sdk#10276)).
* Fix starting a DM from the right panel in some cases ([\element-hq#10278](matrix-org/matrix-react-sdk#10278)). Fixes element-hq#24722.
* Align info EventTile and normal EventTile on IRC layout ([\element-hq#10197](matrix-org/matrix-react-sdk#10197)). Fixes element-hq#22782. Contributed by @luixxiul.
* Fix blowout of waveform of the voice message player on narrow UI ([\element-hq#8861](matrix-org/matrix-react-sdk#8861)). Fixes element-hq#22604. Contributed by @luixxiul.
* Fix the hidden view source toggle on IRC layout ([\element-hq#10266](matrix-org/matrix-react-sdk#10266)). Fixes element-hq#22872. Contributed by @luixxiul.
* Fix buttons on the room header being compressed due to long room name ([\element-hq#10155](matrix-org/matrix-react-sdk#10155)). Contributed by @luixxiul.
* Use the room avatar as a placeholder in calls ([\element-hq#10231](matrix-org/matrix-react-sdk#10231)).
* Fix calls showing as 'connecting' after hangup ([\element-hq#10223](matrix-org/matrix-react-sdk#10223)).
* Prevent multiple Jitsi calls started at the same time ([\element-hq#10183](matrix-org/matrix-react-sdk#10183)). Fixes element-hq#23009.
* Make localization keys compatible with agglutinative and/or SOV type languages ([\element-hq#10159](matrix-org/matrix-react-sdk#10159)). Contributed by @luixxiul.
su-ex added a commit to SchildiChat/matrix-react-sdk that referenced this issue Mar 15, 2023
* Only allow to start a DM with one email if encryption by default is enabled ([\matrix-org#10253](matrix-org#10253)). Fixes element-hq/element-web#23133.
* DM rooms are now encrypted if encryption by default is enabled and only inviting a single email address. Any action in the result DM room will be blocked until the other has joined. ([\matrix-org#10229](matrix-org#10229)).
* Reduce bottom margin of ReplyChain on compact modern layout ([\matrix-org#8972](matrix-org#8972)). Fixes element-hq/element-web#22748. Contributed by @luixxiul.
* Support for v2 of MSC3903 ([\matrix-org#10165](matrix-org#10165)). Contributed by @hughns.
* When starting a DM, existing rooms with pending third-party invites will be reused. ([\matrix-org#10256](matrix-org#10256)). Fixes element-hq/element-web#23139.
* Polls push rules: synchronise poll rules with message rules ([\matrix-org#10263](matrix-org#10263)). Contributed by @kerryarchibald.
* New verification request toast button labels ([\matrix-org#10259](matrix-org#10259)).
* Remove padding around integration manager iframe ([\matrix-org#10148](matrix-org#10148)).
* Fix block code styling in rich text editor ([\matrix-org#10246](matrix-org#10246)). Contributed by @alunturner.
* Poll history: fetch more poll history ([\matrix-org#10235](matrix-org#10235)). Contributed by @kerryarchibald.
* Sort short/exact emoji matches before longer incomplete matches ([\matrix-org#10212](matrix-org#10212)). Fixes element-hq/element-web#23210. Contributed by @grimhilt.
* Poll history: detail screen ([\matrix-org#10172](matrix-org#10172)). Contributed by @kerryarchibald.
* Provide a more detailed error message than "No known servers" ([\matrix-org#6048](matrix-org#6048)). Fixes element-hq/element-web#13247. Contributed by @aaronraimist.
* Say when a call was answered from a different device ([\matrix-org#10224](matrix-org#10224)).
* Widget permissions customizations using module api ([\matrix-org#10121](matrix-org#10121)). Contributed by @maheichyk.
* Fix copy button icon overlapping with copyable text ([\matrix-org#10227](matrix-org#10227)). Contributed by @Adesh-Pandey.
* Support joining non-peekable rooms via the module API ([\matrix-org#10154](matrix-org#10154)). Contributed by @maheichyk.
* The "new login" toast does now display the same device information as in the settings. "No" does now open the device settings. "Yes, it was me" dismisses the toast. ([\matrix-org#10200](matrix-org#10200)).
* Do not prompt for a password when doing a „reset all“ after login ([\matrix-org#10208](matrix-org#10208)).
* Fix incorrect copy in space creation flow ([\matrix-org#10296](matrix-org#10296)). Fixes element-hq/element-web#24741.
* Fix space settings dialog having rogue title tooltip ([\matrix-org#10293](matrix-org#10293)). Fixes element-hq/element-web#24740.
* Show spinner when starting a DM from the user profile (right panel) ([\matrix-org#10290](matrix-org#10290)).
* Reduce height of toggle on expanded view source event ([\matrix-org#10283](matrix-org#10283)). Fixes element-hq/element-web#22873. Contributed by @luixxiul.
* Pillify http and non-prefixed matrix.to links ([\matrix-org#10277](matrix-org#10277)). Fixes element-hq/element-web#20844.
* Fix some features not being configurable via `features` ([\matrix-org#10276](matrix-org#10276)).
* Fix starting a DM from the right panel in some cases ([\matrix-org#10278](matrix-org#10278)). Fixes element-hq/element-web#24722.
* Align info EventTile and normal EventTile on IRC layout ([\matrix-org#10197](matrix-org#10197)). Fixes element-hq/element-web#22782. Contributed by @luixxiul.
* Fix blowout of waveform of the voice message player on narrow UI ([\matrix-org#8861](matrix-org#8861)). Fixes element-hq/element-web#22604. Contributed by @luixxiul.
* Fix the hidden view source toggle on IRC layout ([\matrix-org#10266](matrix-org#10266)). Fixes element-hq/element-web#22872. Contributed by @luixxiul.
* Fix buttons on the room header being compressed due to long room name ([\matrix-org#10155](matrix-org#10155)). Contributed by @luixxiul.
* Use the room avatar as a placeholder in calls ([\matrix-org#10231](matrix-org#10231)).
* Fix calls showing as 'connecting' after hangup ([\matrix-org#10223](matrix-org#10223)).
* Prevent multiple Jitsi calls started at the same time ([\matrix-org#10183](matrix-org#10183)). Fixes element-hq/element-web#23009.
* Make localization keys compatible with agglutinative and/or SOV type languages ([\matrix-org#10159](matrix-org#10159)). Contributed by @luixxiul.
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Mar 29, 2023
https://build.opensuse.org/request/show/1075029
by user dheidler + dimstar_suse
- Version 1.11.26
## 🐛 Bug Fixes
 * Changes for matrix-js-sdk v24.0.0
 * Changes for matrix-react-sdk v3.69.0

- Version 1.11.25
## ✨ Features
 * Remove experimental PWA support for Firefox and Safari ([\#24630](element-hq/element-web#24630)).
 * Only allow to start a DM with one email if encryption by default is enabled ([\#10253](matrix-org/matrix-react-sdk#10253)). Fixes element-hq/element-web#23133.
 * DM rooms are now encrypted if encryption by default is enabled and only inviting a single email address. Any action in the result DM room will be blocked until the other has joined. ([\#10229](matrix-org/matrix-react-sdk#10229)).
 * Reduce bottom margin of ReplyChain on compact modern layout ([\#8972](https://github.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-DMs A-Immutable-DMs O-Frequent Affects or can be seen by most users regularly or impacts most users' first experience T-Enhancement
Projects
None yet
6 participants