From 7218595c17b2b98948dca5317e95b82a86f3d8d8 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 29 Jul 2019 19:54:21 +0200 Subject: [PATCH] only send message if it's non-empty --- src/domain/session/room/RoomViewModel.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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}); + } } }