element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.27k stars 2.02k forks source link

/msg always creates encrypted rooms even if recipient can't use encryption #14851

Closed aaronraimist closed 4 years ago

aaronraimist commented 4 years ago

User in #element:matrix.org wanted to use @appservice-irc:matrix.org so they typed /msg @appservice-irc:matrix.org whatever and it created an encrypted room. It shouldn't do that since @appservice-irc:matrix.org doesn't have any devices capable of encryption. Using the UI to create the DM works correctly.

t3chguy commented 4 years ago

Hmm, both paths use canEncryptToAllUsers

t3chguy commented 4 years ago

Cannot reproduce, I used /query @appservice-irc:matrix.org and it opened the room in plaintext image

Same for /msg

image

oXyiGYJ commented 4 years ago

Sorry for the late reply. This is what I see, still on the latest release.

appserviceencrypt

/query does the same thing, starts an encrypted chat.

t3chguy commented 4 years ago

Yes they both use the same code path. If the user has any e2ee devices then it'll use encryption.

oXyiGYJ commented 4 years ago

Not sure why mine is doing that, even on different Element instances. What can I do to see whats causing this?

t3chguy commented 4 years ago

In the room it creates, can you select the other user in the right panel and show a screenshot of the device list

oXyiGYJ commented 4 years ago

This is all that I see when I click on appservice-irc

appserviceside

t3chguy commented 4 years ago

Weird, based on that it should not be encrypted

t3chguy commented 4 years ago

I just reproduced, investigating