File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
package/src/components/Channel Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -560,7 +560,7 @@ const ChannelWithContext = <
560560 handleRetry,
561561 handleThreadReply,
562562 hasCameraPicker = isImagePickerAvailable ( ) ,
563- hasCommands = true ,
563+ hasCommands = ( channel . getConfig ( ) ?. commands ?? [ ] ) . length > 0 ,
564564 hasCreatePoll,
565565 // If pickDocument isn't available, default to hiding the file picker
566566 hasFilePicker = isDocumentPickerAvailable ( ) ,
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