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
373 B
JavaScript
Raw Normal View History

2019-03-09 05:10:03 +05:30
import MessageTile from "./MessageTile.js";
export default class TextTile extends MessageTile {
get label() {
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 (this._entry.type() === "m.emote") {
return `* ${this._entry.event.sender} ${body}`;
} else {
return body;
}
2019-03-09 05:10:03 +05:30
}
}