Add full MXID to message avatar/sender

This commit is contained in:
Eric Eastwood 2022-11-08 22:11:38 -06:00
parent 9ad5dd752c
commit 308a215349
2 changed files with 6 additions and 2 deletions

View File

@ -75,7 +75,7 @@ export class BaseMessageTile extends SimpleTile {
} }
get avatarTitle() { get avatarTitle() {
return this.displayName; return this.sender;
} }
get date() { get date() {

View File

@ -31,7 +31,11 @@ export function renderStaticAvatar(vm, size, extraClasses = undefined) {
avatarClasses += ` ${extraClasses}`; avatarClasses += ` ${extraClasses}`;
} }
const avatarContent = hasAvatar ? renderImg(vm, size) : text(vm.avatarLetter); 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) { if (hasAvatar) {
setAttribute(avatar, "data-avatar-letter", vm.avatarLetter); setAttribute(avatar, "data-avatar-letter", vm.avatarLetter);
setAttribute(avatar, "data-avatar-color", vm.avatarColorNumber); setAttribute(avatar, "data-avatar-color", vm.avatarColorNumber);