element-hq / element-hq/element-ios
Add a build setting to restrict the display of the matrix IDs in the application
- Dominant language
- Swift
- Stars
- 1.8k
- Forks
- 544
- PR merge metrics
- PR metrics pending
Description
### Your use case
#### What would you like to do?
I would like to be able to build an Element variant in which the matrix Id is displayed only when the user display name is not defined, or when the id may help to disambiguate contacts with the same display name
#### Why would you like to do it?
In some closed federations, the matrix id display is not relevant
#### How would you like to achieve it?
- By adding a build settings: "restrictMatrixIdDisplay"
- the property `forceMatrixIdInDisplayName` of the [ContactsDataSource](https://github.com/vector-im/element-ios/blob/develop/Riot/Modules/Contacts/DataSources/ContactsDataSource.h#L128) should be removed (the new build setting will replace it)
- the property `showMatrixIdInDisplayName` of the [ContactTableViewCell](https://github.com/vector-im/element-ios/blob/develop/Riot/Modules/Contacts/Views/ContactTableViewCell.h#L46) should depend on this build setting
- the new build setting should be considered on the following points:
- hide or not the matrix Id reference in some search placeholder. Note: there are several string to update: `room_creation_invite_another_user` and `room_participants_invite_another_user`
- hide or not the matrix Id of the end user in the application settings
- hide or not the matrix Id in the contact/room member screen details

I miss perhaps some other places where the matrix Id is displayed, they may be handled progressively
Note: the client must trigger a getProfile request on each matrixId when the potential display name is not available locally, in order to get the potential display name and use it instead of using systematically the matrix id (as a fallback). This last point should be handled by another issue
### Have you considered any alternatives?
_No response_
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.