diff --git a/src/domain/session/room/RoomViewModel.js b/src/domain/session/room/RoomViewModel.js index a628349e..23875e20 100644 --- a/src/domain/session/room/RoomViewModel.js +++ b/src/domain/session/room/RoomViewModel.js @@ -65,6 +65,8 @@ export default class RoomViewModel extends EventEmitter { } sendMessage(message) { - this._room.sendEvent("m.room.message", {msgtype: "m.text", body: message}); + if (message) { + this._room.sendEvent("m.room.message", {msgtype: "m.text", body: message}); + } } }