From 3beaf88a8b9d51cd9cd4c91eea360d8db924d541 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Tue, 11 May 2021 13:46:38 +0530 Subject: [PATCH] Rename messageFormat to body Signed-off-by: RMidhunSuresh --- src/domain/session/room/timeline/tiles/TextTile.js | 2 +- src/platform/web/ui/session/room/timeline/TextMessageView.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/domain/session/room/timeline/tiles/TextTile.js b/src/domain/session/room/timeline/tiles/TextTile.js index 5a1bdb78..ba898963 100644 --- a/src/domain/session/room/timeline/tiles/TextTile.js +++ b/src/domain/session/room/timeline/tiles/TextTile.js @@ -18,7 +18,7 @@ import {MessageTile} from "./MessageTile.js"; import { MessageBodyBuilder } from "../MessageBodyBuilder.js"; export class TextTile extends MessageTile { - get messageFormat() { + get body() { const content = this._getContent(); let body = content?.body || ""; if (content.msgtype === "m.emote") { diff --git a/src/platform/web/ui/session/room/timeline/TextMessageView.js b/src/platform/web/ui/session/room/timeline/TextMessageView.js index e13ea037..d78c49da 100644 --- a/src/platform/web/ui/session/room/timeline/TextMessageView.js +++ b/src/platform/web/ui/session/room/timeline/TextMessageView.js @@ -21,7 +21,7 @@ import {renderMessage} from "./common.js"; export class TextMessageView extends TemplateView { render(t, vm) { - const bodyView = t.mapView(vm => vm.messageFormat, messageFormat => new BodyView(messageFormat)); + const bodyView = t.mapView(vm => vm.body, body => new BodyView(body)); return renderMessage(t, vm, [t.p([bodyView, t.time({className: {hidden: !vm.date}}, vm.date + " " + vm.time)])] );