File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
package/src/components/Channel Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -560,7 +560,6 @@ const ChannelWithContext = <
560560 handleRetry,
561561 handleThreadReply,
562562 hasCameraPicker = isImagePickerAvailable ( ) ,
563- hasCommands = true ,
564563 hasCreatePoll,
565564 // If pickDocument isn't available, default to hiding the file picker
566565 hasFilePicker = isDocumentPickerAvailable ( ) ,
@@ -1828,7 +1827,7 @@ const ChannelWithContext = <
18281827 FileUploadPreview,
18291828 handleAttachButtonPress,
18301829 hasCameraPicker,
1831- hasCommands,
1830+ hasCommands : ( getChannelConfigSafely ( ) ?. commands ?? [ ] ) . length > 0 ,
18321831 hasFilePicker,
18331832 hasImagePicker,
18341833 ImageUploadPreview,
Original file line number Diff line number Diff line change @@ -77,6 +77,8 @@ describe('Channel', () => {
7777 useMockedApis ( chatClient , [ getOrCreateChannelApi ( mockedChannel ) ] ) ;
7878 channel = chatClient . channel ( 'messaging' , mockedChannel . id ) ;
7979 channel . cid = mockedChannel . channel . cid ;
80+ const getConfigSpy = jest . fn ( ) ;
81+ channel . getConfig = getConfigSpy ;
8082 } ) ;
8183
8284 afterEach ( ( ) => {
You can’t perform that action at this time.
0 commit comments