From 2f883d049cb85dd5955d7d49d6e918f382454408 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Sat, 8 May 2021 19:20:07 +0530 Subject: [PATCH] Return new message format instead of message text Signed-off-by: RMidhunSuresh --- src/domain/session/room/timeline/tiles/TextTile.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/domain/session/room/timeline/tiles/TextTile.js b/src/domain/session/room/timeline/tiles/TextTile.js index 8f5265d4..fc8db31e 100644 --- a/src/domain/session/room/timeline/tiles/TextTile.js +++ b/src/domain/session/room/timeline/tiles/TextTile.js @@ -15,15 +15,16 @@ limitations under the License. */ import {MessageTile} from "./MessageTile.js"; +import { Linkifier } from "../../../../Linkifier.js"; export class TextTile extends MessageTile { - get text() { + get messageFormat() { const content = this._getContent(); - const body = content && content.body; + let body = content && content.body; if (content.msgtype === "m.emote") { - return `* ${this.displayName} ${body}`; - } else { - return body; + body = `* ${this.displayName} ${body}`; } + const obj = new Linkifier(body); + return obj.linkify(); } }