Skip to content

Commit 583df0c

Browse files
committed
fix: add StreamedMessageText to component ctx
1 parent bb98f69 commit 583df0c

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

src/components/Channel/Channel.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ type ChannelPropsForwardedToComponentContext<
162162
| 'UnreadMessagesSeparator'
163163
| 'VirtualMessage'
164164
| 'StopAIGenerationButton'
165+
| 'StreamedMessageText'
165166
>;
166167

167168
const isUserResponseArray = <
@@ -1275,6 +1276,7 @@ const ChannelInner = <
12751276
SendButton: props.SendButton,
12761277
StartRecordingAudioButton: props.StartRecordingAudioButton,
12771278
StopAIGenerationButton: props.StopAIGenerationButton,
1279+
StreamedMessageText: props.StreamedMessageText,
12781280
ThreadHead: props.ThreadHead,
12791281
ThreadHeader: props.ThreadHeader,
12801282
ThreadStart: props.ThreadStart,
@@ -1342,6 +1344,7 @@ const ChannelInner = <
13421344
props.UnreadMessagesSeparator,
13431345
props.VirtualMessage,
13441346
props.StopAIGenerationButton,
1347+
props.StreamedMessageText,
13451348
props.emojiSearchIndex,
13461349
props.reactionOptions,
13471350
],

src/components/Message/MessageSimple.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { MessageEditedTimestamp } from './MessageEditedTimestamp';
3434

3535
import type { MessageUIComponentProps } from './types';
3636
import type { DefaultStreamChatGenerics } from '../../types/types';
37-
import { StreamedMessageText } from './StreamedMessageText';
37+
import { StreamedMessageText as DefaultStreamedMessageText } from './StreamedMessageText';
3838

3939
type MessageSimpleWithContextProps<
4040
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
@@ -82,6 +82,7 @@ const MessageSimpleWithContext = <
8282
MessageStatus = DefaultMessageStatus,
8383
MessageTimestamp = DefaultMessageTimestamp,
8484
ReactionsList = DefaultReactionList,
85+
StreamedMessageText = DefaultStreamedMessageText,
8586
PinIndicator,
8687
} = useComponentContext<StreamChatGenerics>('MessageSimple');
8788

src/context/ComponentContext.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import {
3737
RecordingPermissionDeniedNotificationProps,
3838
SendButtonProps,
3939
StartRecordingAudioButtonProps,
40+
StreamedMessageTextProps,
4041
SuggestionItemProps,
4142
SuggestionListProps,
4243
ThreadHeaderProps,
@@ -166,6 +167,7 @@ export type ComponentContextValue<
166167
/** Custom UI component button for initiating audio recording, defaults to and accepts same props as: [StartRecordingAudioButton](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MediaRecorder/AudioRecorder/AudioRecordingButtons.tsx) */
167168
StartRecordingAudioButton?: React.ComponentType<StartRecordingAudioButtonProps>;
168169
StopAIGenerationButton?: React.ComponentType<StopAIGenerationButtonProps> | null;
170+
StreamedMessageText?: React.ComponentType<StreamedMessageTextProps>;
169171
/** Custom UI component that displays thread's parent or other message at the top of the `MessageList`, defaults to and accepts same props as [MessageSimple](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageSimple.tsx) */
170172
ThreadHead?: React.ComponentType<MessageProps<StreamChatGenerics>>;
171173
/** Custom UI component to display the header of a `Thread`, defaults to and accepts same props as: [DefaultThreadHeader](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Thread/Thread.tsx) */

0 commit comments

Comments
 (0)