Widget: avoid empty user display name

This commit is contained in:
Benoit Marty 2021-02-05 09:36:29 +01:00
parent 0f55291089
commit 5b3065730e
2 changed files with 2 additions and 2 deletions

View file

@ -8,7 +8,7 @@ Improvements 🙌:
-
Bugfix 🐛:
-
- Bug in WidgetContent.computeURL() (#2767)
Translations 🗣:
-

View file

@ -70,7 +70,7 @@ internal class WidgetFactory @Inject constructor(private val userDataSource: Use
val myUser = userDataSource.getUser(userId)
computedUrl = computedUrl
.replace("\$matrix_user_id", userId)
.replace("\$matrix_display_name", myUser?.displayName ?: userId)
.replace("\$matrix_display_name", myUser?.getBestName() ?: userId)
.replace("\$matrix_avatar_url", myUser?.avatarUrl ?: "")
.replace("\$matrix_widget_id", widgetId)