From 8cc863de0a9b5fd9c641d8bcde352b7c10bd94f4 Mon Sep 17 00:00:00 2001 From: Ivan Sekovanikj <31964049+isekovanic@users.noreply.github.com> Date: Tue, 10 Dec 2024 12:31:40 +0100 Subject: [PATCH] fix: only disable message input ui when capabilities change (#2836) --- package/src/components/MessageInput/MessageInput.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package/src/components/MessageInput/MessageInput.tsx b/package/src/components/MessageInput/MessageInput.tsx index d7985e4a3..2e777507c 100644 --- a/package/src/components/MessageInput/MessageInput.tsx +++ b/package/src/components/MessageInput/MessageInput.tsx @@ -1103,7 +1103,7 @@ export const MessageInput = < const { isOnline } = useChatContext(); const ownCapabilities = useOwnCapabilitiesContext(); - const { disabled, members, threadList, watchers } = useChannelContext(); + const { members, threadList, watchers } = useChannelContext(); const { additionalTextInputProps, @@ -1182,7 +1182,7 @@ export const MessageInput = < * Disable the message input if the channel is frozen, or the user doesn't have the capability to send a message. * Enable it in frozen mode, if it the input has editing state. */ - if ((disabled || !ownCapabilities.sendMessage) && !editing && SendMessageDisallowedIndicator) { + if (!ownCapabilities.sendMessage && !editing && SendMessageDisallowedIndicator) { return ; }