From fc3b391aa929eee784b4827d75952df5890fdc26 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Mon, 10 May 2021 21:41:07 +0530 Subject: [PATCH] Use MessageBodyBuilder instead of linkify Signed-off-by: RMidhunSuresh --- src/domain/session/room/timeline/tiles/TextTile.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/domain/session/room/timeline/tiles/TextTile.js b/src/domain/session/room/timeline/tiles/TextTile.js index e72492c9..1f940970 100644 --- a/src/domain/session/room/timeline/tiles/TextTile.js +++ b/src/domain/session/room/timeline/tiles/TextTile.js @@ -15,7 +15,7 @@ limitations under the License. */ import {MessageTile} from "./MessageTile.js"; -import { Linkifier } from "../Linkifier.js"; +import { MessageBodyBuilder } from "../MessageBodyBuilder.js"; export class TextTile extends MessageTile { get messageFormat() { @@ -24,7 +24,8 @@ export class TextTile extends MessageTile { if (content.msgtype === "m.emote") { body = `* ${this.displayName} ${body}`; } - const obj = new Linkifier(body); - return obj.linkify(); + const message = new MessageBodyBuilder(); + message.fromText(body); + return message; } }