element-hq / element-web

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

Hide undecryptable messages which predate your device's participation in a e2e room #2258

Closed ara4n closed 1 year ago

richvdh commented 7 years ago

The main blocker on this is trying to decide which messages predate your participation. Clearly a simple timestamp isn't good enough as there is a finite delay between your device coming on line and everyone else in the room hearing about it.

It also interacts with the key-sharing: you may be able to get the keys to the messages by some other means, so don't necessarily want them to be hidden - although a way to distinguish between "this was sent before you joined the room" from "something random went wrong" would certainly be useful.

uhoreg commented 4 years ago

We can probably use the message timestamp as a hint to show a more useful message to the user. Maybe something a long the lines of "This message seems to have been sent before you logged into this device. We're trying to fetch the keys from your other devices if any of them were logged in when the message was sent." Except we'd probably want the message to be shorter and/or collapse multiple UTD messages.

We could also offer to restore the keys from backup too. (In fact, why don't we do this for all undecryptable messages?) We can either check if the server has a backup for the key and then say "You can restore the key from backup", or we can ask the user if they want to "Try to restore from backup". The former would probably be more user-friendly, but would require querying the server (and would probably need to do some caching).

This probably requires design from @nadonomy, but it seems like it's non-trivial, so we may want to punt it for a bit unless he thinks it's worth doing right away.

aaronraimist commented 3 years ago

https://github.com/matrix-org/matrix-react-sdk/pull/3881 implemented this didn't it?

I originally agreed with this but SO MANY people get tripped up that UTDs from before they joined are not visible. I would vote to revert it or at least put a big warning box above the timeline saying there are messages here but they are being intentionally hidden.

uhoreg commented 3 years ago

Yes, we are planning on improving the display so that it is not as confusing. Stay tuned...

uhoreg commented 2 years ago

Looking at this again, matrix-org/matrix-react-sdk#3881 implemented something different from what this issue is about. 3881 hides messages from before you joined the room, whereas AIUI this issue is about hiding messages from before your device logged in.

BTW, fixing the display so you don't get a blank space in place of the UTDs is https://github.com/vector-im/element-web/issues/19888, and there is a patch to fix it at https://github.com/matrix-org/matrix-react-sdk/pull/5887

richvdh commented 1 year ago

Given that we now have key-sharing between devices, I don't think we want to do this any more.