Add full MXID tooltip to message sender display name

Follow-up to https://github.com/vector-im/hydrogen-web/pull/917
This commit is contained in:
Eric Eastwood 2022-11-10 20:59:27 -06:00
parent dbac61f78f
commit 4125165760

View File

@ -63,7 +63,13 @@ export class BaseMessageView extends TemplateView {
li.removeChild(li.querySelector(".Timeline_messageSender"));
} else if (!isContinuation && !this._isReplyPreview) {
const avatar = tag.a({href: vm.memberPanelLink, className: "Timeline_messageAvatar"}, [renderStaticAvatar(vm, 30)]);
const sender = tag.div({className: `Timeline_messageSender usercolor${vm.avatarColorNumber}`}, vm.displayName);
const sender = tag.div(
{
className: `Timeline_messageSender usercolor${vm.avatarColorNumber}`,
title: vm.sender,
},
vm.displayName,
);
li.insertBefore(avatar, li.firstChild);
li.insertBefore(sender, li.firstChild);
}