This repository has been archived on 2022-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
hydrogen-web/src/domain/session/room/timeline/tiles/TextTile.js

14 lines
357 B
JavaScript
Raw Normal View History

import {MessageTile} from "./MessageTile.js";
2019-03-09 05:10:03 +05:30
export class TextTile extends MessageTile {
get text() {
2019-03-09 05:10:03 +05:30
const content = this._getContent();
2019-06-01 22:02:17 +05:30
const body = content && content.body;
if (content.msgtype === "m.emote") {
return `* ${this._entry.sender} ${body}`;
2019-06-01 22:02:17 +05:30
} else {
return body;
2019-06-01 22:02:17 +05:30
}
2019-03-09 05:10:03 +05:30
}
}