do not render chat input when no permission

This commit is contained in:
OfficialDakari 2025-05-04 13:34:39 +05:00
parent ed6d7e527d
commit 442a5a5cdf
1 changed files with 13 additions and 0 deletions

View File

@ -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(