@@ -13,8 +13,8 @@ import {
1313 SendMessageAPIResponse ,
1414 StreamChat ,
1515 Message as StreamMessage ,
16+ UpdatedMessage ,
1617} from 'stream-chat' ;
17- import { v4 as uuidv4 } from 'uuid' ;
1818
1919import { EmptyStateIndicator as EmptyStateIndicatorDefault } from '../Indicators/EmptyStateIndicator' ;
2020import { LoadingErrorIndicator as LoadingErrorIndicatorDefault } from '../Indicators/LoadingErrorIndicator' ;
@@ -52,6 +52,7 @@ import type {
5252 DefaultUserType ,
5353 UnknownType ,
5454} from '../../types/types' ;
55+ import { generateRandomId } from '../../utils/generateRandomId' ;
5556
5657export type ChannelProps <
5758 At extends UnknownType = DefaultAttachmentType ,
@@ -111,7 +112,7 @@ export type ChannelProps<
111112 */
112113 doUpdateMessageRequest ?: (
113114 channelId : string ,
114- updatedMessage : StreamMessage < At , Me , Us > ,
115+ updatedMessage : UpdatedMessage < At , Ch , Co , Me , Re , Us > ,
115116 ) => ReturnType < StreamChat < At , Ch , Co , Ev , Me , Re , Us > [ 'updateMessage' ] > ;
116117 emojiData ?: MessagesContextValue < At , Ch , Co , Ev , Me , Re , Us > [ 'emojiData' ] ;
117118 /**
@@ -454,7 +455,7 @@ export const Channel = <
454455 attachments,
455456 created_at : new Date ( ) ,
456457 html : text ,
457- id : `${ client . userID } -${ uuidv4 ( ) } ` ,
458+ id : `${ client . userID } -${ generateRandomId ( ) } ` ,
458459 mentioned_users :
459460 mentioned_users ?. map ( ( userId ) => ( {
460461 id : userId ,
0 commit comments