Skip to content

Commit 435d0f9

Browse files
Add title attribute to user identifier (#29547)
1 parent c1a4441 commit 435d0f9

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/components/structures/UserMenu.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -370,20 +370,22 @@ export default class UserMenu extends React.Component<IProps, IState> {
370370
? toRightOf(this.state.contextMenuPosition)
371371
: below(this.state.contextMenuPosition);
372372

373+
const userIdentifierString = UserIdentifierCustomisations.getDisplayUserIdentifier(
374+
MatrixClientPeg.safeGet().getSafeUserId(),
375+
{
376+
withDisplayName: true,
377+
},
378+
);
379+
373380
return (
374381
<IconizedContextMenu {...position} onFinished={this.onCloseMenu} className="mx_UserMenu_contextMenu">
375382
<div className="mx_UserMenu_contextMenu_header">
376383
<div className="mx_UserMenu_contextMenu_name">
377384
<span className="mx_UserMenu_contextMenu_displayName">
378385
{OwnProfileStore.instance.displayName}
379386
</span>
380-
<span className="mx_UserMenu_contextMenu_userId">
381-
{UserIdentifierCustomisations.getDisplayUserIdentifier(
382-
MatrixClientPeg.safeGet().getSafeUserId(),
383-
{
384-
withDisplayName: true,
385-
},
386-
)}
387+
<span className="mx_UserMenu_contextMenu_userId" title={userIdentifierString || ""}>
388+
{userIdentifierString}
387389
</span>
388390
</div>
389391

0 commit comments

Comments
 (0)