@@ -48,28 +48,14 @@ const userId = parseUserIdFromToken(userToken);
4848const filters : ChannelFilters = {
4949 members : { $in : [ userId ] } ,
5050 type : 'messaging' ,
51- // archived: false,
51+ archived : false ,
5252} ;
5353const options : ChannelOptions = { limit : 5 , presence : true , state : true } ;
5454const sort : ChannelSort = { pinned_at : 1 , last_message_at : - 1 , updated_at : - 1 } ;
5555
5656// @ts -ignore
5757const isMessageAIGenerated = ( message : LocalMessage ) => ! ! message ?. ai_generated ;
5858
59- const Btn = ( { sendMessage } : SendButtonProps ) => {
60- const messageComposer = useMessageComposer ( ) ;
61- return (
62- < button
63- onClick = { ( e ) => {
64- messageComposer . customDataManager . setData ( { a : 'b' } ) ;
65- sendMessage ( e ) ;
66- } }
67- >
68- Submit
69- </ button >
70- ) ;
71- } ;
72-
7359const App = ( ) => {
7460 const chatClient = useCreateChatClient ( {
7561 apiKey,
@@ -88,9 +74,6 @@ const App = () => {
8874 position : { before : 'stream-io/text-composer/mentions-middleware' } ,
8975 unique : true ,
9076 } ) ;
91- composer . attachmentManager . setCustomUploadFn ( async ( fileLike ) => {
92- return composer . attachmentManager . doDefaultUploadRequest ( fileLike ) ;
93- } ) ;
9477 } ) ;
9578 } , [ chatClient ] ) ;
9679
@@ -109,7 +92,7 @@ const App = () => {
10992 showChannelSearch
11093 additionalChannelSearchProps = { { searchForChannels : true } }
11194 />
112- < Channel emojiSearchIndex = { SearchIndex } SendButton = { Btn } >
95+ < Channel emojiSearchIndex = { SearchIndex } >
11396 < Window >
11497 < ChannelHeader Avatar = { ChannelAvatar } />
11598 < MessageList returnAllReadData />
0 commit comments