Skip to content
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

Add a fallback for user displayName when this one is null or empty #3732

Closed
yostyle opened this issue Jul 23, 2021 · 2 comments · Fixed by #4034
Closed

Add a fallback for user displayName when this one is null or empty #3732

yostyle opened this issue Jul 23, 2021 · 2 comments · Fixed by #4034
Assignees
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements

Comments

@yostyle
Copy link
Contributor

yostyle commented Jul 23, 2021

Actually if user displayName is null or empty the function getBestName() return the matrixId.
It should be better to have a fallback as for the room name :RoomDisplayNameFallbackProvider

For example we have this fallback on Tchap : https://github.com/tchapgouv/tchap-android-v2/blob/27fd9730546e7f51734868e61433cb5a4bf4cafd/vector/src/main/java/fr/gouv/tchap/core/utils/TchapUtils.kt#L89

@yostyle yostyle added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements label Jul 23, 2021
@bmarty bmarty added this to the Sprint - Element 1.1.15 milestone Jul 26, 2021
@bmarty bmarty changed the title Add a fallback for user displayName with this one is null or empty Add a fallback for user displayName when this one is null or empty Jul 29, 2021
@bmarty
Copy link
Member

bmarty commented Jul 29, 2021

The current plan is:

  • delete all existing getBestName() method
  • SDK side, create a DisplayNameService, with one method getBestName(matrixItem)
  • On MatrixConfiguration, add an interface to let the app provide an optional userDisplayNameFallbackProvider. If null, default fallback will still be the matrixId
  • The SDK implement DisplayNameService in DefaultDisplayNameService, injecting the MatrixConfiguration.
  • DisplayNameService is available from the session

@bmarty
Copy link
Member

bmarty commented Oct 5, 2021

In EA 1.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants