Fill matrix.to links

This commit is contained in:
RMidhunSuresh 2021-12-16 15:27:53 +05:30
parent 91912bdb8d
commit e0dc853d74
2 changed files with 10 additions and 2 deletions

View File

@ -33,6 +33,14 @@ export class BaseMessageTile extends SimpleTile {
return this._room.mediaRepository; return this._room.mediaRepository;
} }
get roomId() {
return this._room.id;
}
get eventId() {
return this._entry.id;
}
get displayName() { get displayName() {
return this._entry.displayName || this.sender; return this._entry.displayName || this.sender;
} }

View File

@ -49,8 +49,8 @@ export class ReplyPreviewView extends TemplateView {
_renderReplyHeader(vm, children = []) { _renderReplyHeader(vm, children = []) {
return tag.blockquote( return tag.blockquote(
[ [
tag.a({ className: "link", href: "#" }, "In reply to"), tag.a({ className: "link", href: `https://matrix.to/#/${vm.roomId}/${vm.eventId}` }, "In reply to"),
tag.a({ className: "pill", href: "#" }, [renderStaticAvatar(vm, 12, undefined, true), vm.displayName]), tag.a({ className: "pill", href: `https://matrix.to/#/${vm.sender}` }, [renderStaticAvatar(vm, 12, undefined, true), vm.displayName]),
tag.br(), tag.br(),
...children ...children
]); ]);