-
Notifications
You must be signed in to change notification settings - Fork 14
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
Trust & Decoration | Missing mxId in the Banner for unverified user identity change (displayName+avatar is not enough) #2565
Comments
Clarification: It appears that this is the |
@americanrefugee Could you please update the designs accordingly? I think you can then do it also for the verified identity change case if we are doing it anyway. @BillCarsonFr Besides the example you listed - do you know if there is already some sort of de facto standard here? It would be trivial to just add the MXID in partentheses but would be nice to make sure it is identical in all cases.
Also, if this does not include the MXID then how does it make the display name unambiguous? |
@mxandreas If you read code, this is the Kotlin implementation: https://github.com/element-hq/element-x-android/blob/develop/libraries/matrix/api/src/main/kotlin/io/element/android/libraries/matrix/api/room/RoomMember.kt#L43 /**
* Disambiguated display name for the RoomMember.
* If the display name is null, the user ID is returned.
* If the display name is ambiguous, the user ID is appended in parentheses.
* Otherwise, the display name is returned.
*/
val disambiguatedDisplayName: String = when {
displayName == null -> userId.value // will be "alice:server.org"
isNameAmbiguous -> "$displayName ($userId)" // will be "Alice (alice:server.org)"
else -> displayName // will be "Alice"
} But it is definitely possible to always include the mxId. We will need to decide how it will render if the user does not have a display name. Maybe something like: val displayNameWithMxId: String = when {
displayName == null -> userId.value // will be "alice:server.org"
else -> "$displayName ($userId)" // will be "Alice (alice:server.org)"
} |
Thanks for the clarifications! To me it seems the safest and most straightforward option to always include MXID in this scenario. |
@BillCarsonFr Can you change the issue title please? |
Done |
What happen if the user does not have a display name? We repeat the user id like this? alice:domain.org's (alice:domain.org) identity appears to have changed It's fine to me, but please confirm. Also please be aware that translation may look differently, for instance in French this will be something like: L'identité de Alice (alice:domain.org) semble avoir changé. Tech note: since there is a new template (for the userId) we will need to delete all the existing translations. |
If that is an approach that we're already using somewhere, then I think this is preferred. @americanrefugee WDYT? |
the idiomatic thing to do if the user has no displayname is to just show the matrix id (in the alternative font). |
If the user doesn't have a display name, maybe just show the Matrix ID in bold (no parentheses)? Like this: ([email protected])'s verified identity has changed. |
Generally this an approach that apps use in such cases - when something is missing they omit this in a graceful manner. However, I wonder if in this case it is better to "maintain the structure" (e.g. always have 2 fields - like Benoit suggested) to reduce the potential ways how one can trick somebody with this. Having said that, it looks safe to start with just showing the MXID in bold (without parentheses) when display name is missing. We can improve later, unless anyone can immediately name any easy attacks. |
Just a small tech note, we will need 2 different Localazy entries to manage all the cases here:
when a display name is available, and
when there is no display name. Not a big deal, but we take the risk that the strings are not translated (or even updated) the same way. |
@mxandreas will create tasks for the 3 platforms. |
Created tasks for iOS, Android - linked above. For Web - mentioned it in #2565 as it is still in progress. cc: @manuroe @andybalaam |
@BillCarsonFr for info, all the work is done on the EX side. Thanks @bmarty and @pixlwave ! There is no more EX team members assigned to this issue. |
Closing this as iOS and Android are done, and for Web there is a separate issue for tracking this which has made it to the review. |
Follow up of #2544
The current design only shows the user display name
If several users are using the same display name and no avatar it would be impossible to know which one it is talking about. Also a user could change it's display name and avatar to masqarade another user.
Show the MXID in bold and parentheses after the display name. In case display name is missing, omit the parentheses.
Designs:
Tasks
The text was updated successfully, but these errors were encountered: