Skip to content

Commit 322b242

Browse files
committed
fix: respect the hasCommand channel prop as well
1 parent 76ca4b1 commit 322b242

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package/src/components/Channel/Channel.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,7 @@ const ChannelWithContext = <
562562
handleRetry,
563563
handleThreadReply,
564564
hasCameraPicker = isImagePickerAvailable(),
565+
hasCommands,
565566
hasCreatePoll,
566567
// If pickDocument isn't available, default to hiding the file picker
567568
hasFilePicker = isDocumentPickerAvailable(),
@@ -1830,7 +1831,7 @@ const ChannelWithContext = <
18301831
FileUploadPreview,
18311832
handleAttachButtonPress,
18321833
hasCameraPicker,
1833-
hasCommands: (getChannelConfigSafely()?.commands ?? []).length > 0,
1834+
hasCommands: hasCommands ?? (getChannelConfigSafely()?.commands ?? []).length > 0,
18341835
hasFilePicker,
18351836
hasImagePicker,
18361837
ImageUploadPreview,

0 commit comments

Comments
 (0)