require space after /me

This commit is contained in:
Bruno Windels 2020-11-16 19:29:29 +01:00
parent 67c3fb1910
commit d1a95c664d

View File

@ -148,7 +148,7 @@ export class RoomViewModel extends ViewModel {
try { try {
let msgtype = "m.text"; let msgtype = "m.text";
if (message.startsWith("/me ")) { if (message.startsWith("/me ")) {
message = message.substr(3).trim(); message = message.substr(4).trim();
msgtype = "m.emote"; msgtype = "m.emote";
} }
await this._room.sendEvent("m.room.message", {msgtype, body: message}); await this._room.sendEvent("m.room.message", {msgtype, body: message});