From af5a008d0f88549e241b562171d1a6dfab9496ea Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Thu, 6 Jan 2022 17:51:14 +0530 Subject: [PATCH] Move links to vm --- src/domain/session/room/timeline/tiles/BaseMessageTile.js | 8 ++++---- .../web/ui/session/room/timeline/ReplyPreviewView.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/domain/session/room/timeline/tiles/BaseMessageTile.js b/src/domain/session/room/timeline/tiles/BaseMessageTile.js index b59dfa3a..ef0c2c39 100644 --- a/src/domain/session/room/timeline/tiles/BaseMessageTile.js +++ b/src/domain/session/room/timeline/tiles/BaseMessageTile.js @@ -34,12 +34,12 @@ export class BaseMessageTile extends SimpleTile { return this._room.mediaRepository; } - get roomId() { - return this._room.id; + get permaLink() { + return `https://matrix.to/#/${this._room.id}/${this._entry.id}`; } - get eventId() { - return this._entry.id; + get senderProfileLink() { + return `https://matrix.to/#/${this.sender}`; } get displayName() { diff --git a/src/platform/web/ui/session/room/timeline/ReplyPreviewView.js b/src/platform/web/ui/session/room/timeline/ReplyPreviewView.js index 8430986b..b38ff92b 100644 --- a/src/platform/web/ui/session/room/timeline/ReplyPreviewView.js +++ b/src/platform/web/ui/session/room/timeline/ReplyPreviewView.js @@ -34,8 +34,8 @@ export class ReplyPreviewView extends TemplateView { _renderReplyHeader(t, vm, children = []) { return t.blockquote( [ - t.a({ className: "link", href: `https://matrix.to/#/${vm.roomId}/${vm.eventId}` }, "In reply to"), - t.a({ className: "pill", href: `https://matrix.to/#/${vm.sender}` }, [renderStaticAvatar(vm, 12, undefined, true), vm.displayName]), + t.a({ className: "link", href: vm.permaLink }, "In reply to"), + t.a({ className: "pill", href: vm.senderProfileLink }, [renderStaticAvatar(vm, 12, undefined, true), vm.displayName]), t.br(), ...children ]);