From 308a2153499856a604043545e4a5f1cc718f586e Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Tue, 8 Nov 2022 22:11:38 -0600 Subject: [PATCH] Add full MXID to message avatar/sender --- src/domain/session/room/timeline/tiles/BaseMessageTile.js | 2 +- src/platform/web/ui/avatar.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/domain/session/room/timeline/tiles/BaseMessageTile.js b/src/domain/session/room/timeline/tiles/BaseMessageTile.js index 03cc16ba..8fec8572 100644 --- a/src/domain/session/room/timeline/tiles/BaseMessageTile.js +++ b/src/domain/session/room/timeline/tiles/BaseMessageTile.js @@ -75,7 +75,7 @@ export class BaseMessageTile extends SimpleTile { } get avatarTitle() { - return this.displayName; + return this.sender; } get date() { diff --git a/src/platform/web/ui/avatar.js b/src/platform/web/ui/avatar.js index 547d4b51..ce2dfdab 100644 --- a/src/platform/web/ui/avatar.js +++ b/src/platform/web/ui/avatar.js @@ -31,7 +31,11 @@ export function renderStaticAvatar(vm, size, extraClasses = undefined) { avatarClasses += ` ${extraClasses}`; } const avatarContent = hasAvatar ? renderImg(vm, size) : text(vm.avatarLetter); - const avatar = tag.div({className: avatarClasses, "data-testid": "avatar"}, [avatarContent]); + const avatar = tag.div({ + className: avatarClasses, + title: vm.avatarTitle, + "data-testid": "avatar", + }, [avatarContent]); if (hasAvatar) { setAttribute(avatar, "data-avatar-letter", vm.avatarLetter); setAttribute(avatar, "data-avatar-color", vm.avatarColorNumber);