From 442a5a5cdffae0be38d40f38e238ce414e33324d Mon Sep 17 00:00:00 2001 From: OfficialDakari Date: Sun, 4 May 2025 13:34:39 +0500 Subject: [PATCH] do not render chat input when no permission --- lib/pages/chat/chat_input_row.dart | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/pages/chat/chat_input_row.dart b/lib/pages/chat/chat_input_row.dart index 88860a7..0a8fd4b 100644 --- a/lib/pages/chat/chat_input_row.dart +++ b/lib/pages/chat/chat_input_row.dart @@ -27,6 +27,19 @@ class ChatInputRow extends StatelessWidget { } const height = 48.0; + if (!controller.room.canSendDefaultMessages) { + return Center( + child: Padding( + padding: const EdgeInsets.all(12.0), + child: Text( + L10n.of(context).noSendPermission, + style: theme.textTheme.bodySmall, + textAlign: TextAlign.center, + ), + ), + ); + } + if (!controller.room.otherPartyCanReceiveMessages) { return Center( child: Padding(