Skip to content

Commit 6c7cd42

Browse files
authored
fix(examples): enable async voice recording preview in thread composer (#3092)
### 🎯 Goal Voice recordings in threads should show a preview before sending, matching the main channel composer behavior. ### 🛠 Implementation details Added `asyncMessagesMultiSendEnabled: true` to `additionalMessageComposerProps` on both `Thread` instances. Without this prop, `useMediaRecorder` auto-sends the recording on stop instead of stacking it as a preview attachment.
1 parent 2f060ae commit 6c7cd42

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

examples/vite/src/ChatLayout/Panels.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ const ChannelThreadPanel = () => {
3838
})}
3939
>
4040
<Thread
41-
additionalMessageComposerProps={{ audioRecordingEnabled: true }}
41+
additionalMessageComposerProps={{
42+
audioRecordingEnabled: true,
43+
asyncMessagesMultiSendEnabled: true,
44+
}}
4245
virtualized
4346
/>
4447
</WithDragAndDropUpload>
@@ -159,7 +162,10 @@ export const ThreadsPanels = ({
159162
<WithDragAndDropUpload className='str-chat__dropzone-root--thread'>
160163
<WithComponents overrides={{ TypingIndicator }}>
161164
<Thread
162-
additionalMessageComposerProps={{ audioRecordingEnabled: true }}
165+
additionalMessageComposerProps={{
166+
audioRecordingEnabled: true,
167+
asyncMessagesMultiSendEnabled: true,
168+
}}
163169
virtualized
164170
/>
165171
</WithComponents>

0 commit comments

Comments
 (0)