Rename messageFormat to body

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-05-11 13:46:38 +05:30
parent 070bc96186
commit 3beaf88a8b
2 changed files with 2 additions and 2 deletions

View file

@ -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") {

View file

@ -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)])]
);