-
-
Notifications
You must be signed in to change notification settings - Fork 829
Refactor shield display logic; changed rules for DMs #4290
Conversation
This should represent a truth-table for all the behaviours we want to check, given the number of users in a room, DM status, and self-trust status:
NOTE: we don't flip "verified" to "normal" if we don't trust ourselves |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! It's very helpful to have the tests and truth table for this! 😁
✓ 1 verified: returns 'verified', self-trust = false, DM = false
Shouldn't this case be "warning"? The room has someone other than yourself who you have verified, you don't trust yourself, and it's not a DM.
NOTE: we don't flip "verified" to "normal" if we don't trust ourselves
Can you be more specific about which case(s) you mean here?
It's a 1:1 room so it's treated as a DM
Yeah. If it's a DM or a 1:1 room |
Ah right, makes sense then!
Okay, I believe this is implementing the logic as expected. For 1:1 / DM rooms, your view of the room trust is meant to "effectively be the same as" your trust of the other user in the room, so nothing about yourself should affect it. It does mean that each side will see a different shield for the room in 1:1 / DM rooms, but that's known and by design. We'll have to wait for feedback to see if it ends up being confusing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks! 😁
fixes: element-hq/element-web#12484