Return new message format instead of message text
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
9ca0d93a01
commit
2f883d049c
1 changed files with 6 additions and 5 deletions
|
@ -15,15 +15,16 @@ limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {MessageTile} from "./MessageTile.js";
|
import {MessageTile} from "./MessageTile.js";
|
||||||
|
import { Linkifier } from "../../../../Linkifier.js";
|
||||||
|
|
||||||
export class TextTile extends MessageTile {
|
export class TextTile extends MessageTile {
|
||||||
get text() {
|
get messageFormat() {
|
||||||
const content = this._getContent();
|
const content = this._getContent();
|
||||||
const body = content && content.body;
|
let body = content && content.body;
|
||||||
if (content.msgtype === "m.emote") {
|
if (content.msgtype === "m.emote") {
|
||||||
return `* ${this.displayName} ${body}`;
|
body = `* ${this.displayName} ${body}`;
|
||||||
} else {
|
}
|
||||||
return body;
|
const obj = new Linkifier(body);
|
||||||
}
|
return obj.linkify();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue