Merge pull request #917 from vector-im/madlittlemods/full-mxid-tooltip

Add full MXID to message avatar/name
This commit is contained in:
Bruno Windels 2022-11-10 17:27:41 +00:00 committed by GitHub
commit bc96d5add1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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);