Fix user's display name in header on user's page

For example, erased users don't have display name, so header was `User "null"`.
With this change, if there is no display name, the MXID will be show, e.g. `User "@user:example.com"`
This commit is contained in:
Aine 2024-09-03 11:45:47 +03:00
parent dbcb4f92dc
commit 6bc760a6fa
No known key found for this signature in database
GPG key ID: 34969C908CCA2804

View file

@ -184,7 +184,7 @@ const UserTitle = () => {
{translate("resources.users.name", {
smart_count: 1,
})}{" "}
{record ? `"${record.displayname}"` : ""}
{record ? ( record.displayname ? `"${record.displayname}"` : `"${record.name}"`) : ""}
</span>
);
};