From 138da60e55af5b636aa94f14302d4c6598d0a87d Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Wed, 7 Aug 2024 19:02:49 +0800 Subject: [PATCH] :children_crossing: Prevent user from sending empty message --- lib/widgets/chat/chat_message_input.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/widgets/chat/chat_message_input.dart b/lib/widgets/chat/chat_message_input.dart index ce058b5..339fc88 100644 --- a/lib/widgets/chat/chat_message_input.dart +++ b/lib/widgets/chat/chat_message_input.dart @@ -129,6 +129,8 @@ class _ChatMessageInputState extends State { client = auth.configureClient('messaging'); + if (_textController.text.trim().isEmpty && _attachments.isEmpty) return; + const uuid = Uuid(); final payload = { 'uuid': uuid.v4(),