From c0958c6733e125d91061de3a5b521c90d49c10ae Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Sat, 16 Jan 2021 19:44:46 +0100 Subject: [PATCH] fix: Dont send only whitespaces --- lib/views/chat.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/views/chat.dart b/lib/views/chat.dart index 7d1bb122..689a21df 100644 --- a/lib/views/chat.dart +++ b/lib/views/chat.dart @@ -195,7 +195,7 @@ class _ChatState extends State { TextEditingController sendController = TextEditingController(); void send() { - if (sendController.text.isEmpty) return; + if (sendController.text.trim().isEmpty) return; room.sendTextEvent(sendController.text, inReplyTo: replyEvent, editEventId: editEvent?.eventId); sendController.text = pendingText;