Skip to content

Commit 7063a30

Browse files
committed
fix: only disable message input ui when capabilities change (#2836)
1 parent 81bf45b commit 7063a30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

package/src/components/MessageInput/MessageInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1102,7 +1102,7 @@ export const MessageInput = <
11021102
const { isOnline } = useChatContext();
11031103
const ownCapabilities = useOwnCapabilitiesContext();
11041104

1105-
const { disabled, members, threadList, watchers } = useChannelContext<StreamChatGenerics>();
1105+
const { members, threadList, watchers } = useChannelContext<StreamChatGenerics>();
11061106

11071107
const {
11081108
additionalTextInputProps,
@@ -1181,7 +1181,7 @@ export const MessageInput = <
11811181
* Disable the message input if the channel is frozen, or the user doesn't have the capability to send a message.
11821182
* Enable it in frozen mode, if it the input has editing state.
11831183
*/
1184-
if ((disabled || !ownCapabilities.sendMessage) && !editing && SendMessageDisallowedIndicator) {
1184+
if (!ownCapabilities.sendMessage && !editing && SendMessageDisallowedIndicator) {
11851185
return <SendMessageDisallowedIndicator />;
11861186
}
11871187

0 commit comments

Comments
 (0)