fix: Dont send only whitespaces

This commit is contained in:
Christian Pauly 2021-01-16 19:44:46 +01:00
parent c4866c7728
commit c0958c6733
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ class _ChatState extends State<Chat> {
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;