mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
very quick emote support
This commit is contained in:
parent
765a68c766
commit
b10aa269d2
@ -3,6 +3,11 @@ import MessageTile from "./MessageTile.js";
|
|||||||
export default class TextTile extends MessageTile {
|
export default class TextTile extends MessageTile {
|
||||||
get text() {
|
get text() {
|
||||||
const content = this._getContent();
|
const content = this._getContent();
|
||||||
return content && content.body;
|
const body = content && content.body;
|
||||||
|
if (this._entry.type() === "m.emote") {
|
||||||
|
return `* ${this._entry.event.sender} ${body}`;
|
||||||
|
} else {
|
||||||
|
return body;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ export default function ({timeline, emitUpdate}) {
|
|||||||
switch (msgtype) {
|
switch (msgtype) {
|
||||||
case "m.text":
|
case "m.text":
|
||||||
case "m.notice":
|
case "m.notice":
|
||||||
|
case "m.emote":
|
||||||
return new TextTile(options);
|
return new TextTile(options);
|
||||||
case "m.image":
|
case "m.image":
|
||||||
return new ImageTile(options);
|
return new ImageTile(options);
|
||||||
|
Loading…
Reference in New Issue
Block a user