Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ai-docs/ai-migration-v9-to-v10.md
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ means changed. Details in the linked section.
| `client.configs[cid]` | `client.channelServerConfigs[cid]` | §13.1 |
| `channel.serverConfig?.typing_events` (and the other gated flags) | `channel.config.typingEvents.enabled` — resolved, server ANDed with yours | §13.1 |
| `client.setMessageComposerSetupFunction(fn)` | `client.config.setSetupFunction('messageComposer', fn)` | §13.1 |
| `setupCommandUIMiddlewares(composer)` | delete the call; `stream-chat` installs the command middlewares by default | §13.1 |
| re-setting `channel.messagePaginator.pageSize` after mount | `client.config.set({ channel: { messagePaginator: { pageSize } } })` | §13.1, §16.1 |
| `useTargetedMessage()` / `setTargetedMessage(id)` | `useMessagePaginator()?.jumpToMessage(id, { focusReason: 'jump-to-message', focusSignalTtlMs: DEFAULT_HIGHLIGHT_DURATION })`; read with `useIsTargetedMessage(id)` | §6 |
| `useChannelContext().channelUnreadStateStore` / `setChannelUnreadState` | `channel.messagePaginator.unreadStateSnapshot` | §7 |
Expand Down Expand Up @@ -1222,7 +1223,6 @@ that no value can express — middleware, comparators:

```tsx
client.config.setSetupFunction('messageComposer', ({ composer }) => {
setupCommandUIMiddlewares(composer);
composer.textComposer.middlewareExecutor.insert({ /* … */ });
});
```
Expand Down Expand Up @@ -3313,7 +3313,7 @@ Names that still exist in v10 with a different meaning or on a different object
```bash
# stream-chat-react-native / -expo / -core names removed or renamed in v10
rg -n -t js -t ts -g '!**/node_modules/**' '\b(useTypingContext|TypingProvider|TypingContextValue|useCreateTypingContext|usePaginatedMessageListContext|PaginatedMessageListProvider|PaginatedMessageListContextValue|useCreatePaginatedMessageListContext|useTargetedMessage|setTargetedMessage|channelUnreadStateStore|setChannelUnreadState|ChannelUnreadState|loadChannelAroundMessage|loadChannelAtFirstUnreadMessage|reloadChannel|highlightedMessageId|loadMoreThread|loadMoreRecentThread|reloadThread|threadMessages|setThreadMessages|threadHasMore|threadLoadingMore|threadLoadingMoreRecent|threadInstance|closeThreadOnDismount|ThreadMessageComposer|ThreadType|additionalMessageListProps|additionalMessageFlashListProps|additionalMessageComposerProps|shouldUseFlashList|shouldSyncChannel|MessageActionsHookProps|uploadAbortControllerRef|deliveredToCount|connectionRecovering)\b' .
rg -n -t js -t ts -g '!**/node_modules/**' '\b(doMarkReadRequest|doSendMessageRequest|doUpdateMessageRequest|stateUpdateThrottleInterval|newMessageStateUpdateThrottleInterval|preSendMessageRequest|patchMessageTextCommand|maximumMessageLimit|allowSendBeforeAttachmentsUpload|useChannelUpdated|queryChannelsOverride|lockChannelOrder|onAddedToChannel|onRemovedFromChannel|onChannelDeleted|onChannelHidden|onChannelVisible|onChannelUpdated|onChannelTruncated|onChannelMemberUpdated|onNewMessage|onNewMessageNotification|useSelectedChannelState|reduceMessagesToString|findInMessagesById|findInMessagesByDate|getLastReceivedMessage|DebugContextProvider|useDebugContext|DebugContextValue|DebugDataType|useIsOnline|isChannelActive|scrollToFirstUnreadThreshold|deleteReactionsForMessage|useClientMutedUsers|useAppSettings)\b' .
rg -n -t js -t ts -g '!**/node_modules/**' '\b(doMarkReadRequest|doSendMessageRequest|doUpdateMessageRequest|stateUpdateThrottleInterval|newMessageStateUpdateThrottleInterval|preSendMessageRequest|patchMessageTextCommand|maximumMessageLimit|allowSendBeforeAttachmentsUpload|useChannelUpdated|queryChannelsOverride|lockChannelOrder|onAddedToChannel|onRemovedFromChannel|onChannelDeleted|onChannelHidden|onChannelVisible|onChannelUpdated|onChannelTruncated|onChannelMemberUpdated|onNewMessage|onNewMessageNotification|useSelectedChannelState|reduceMessagesToString|findInMessagesById|findInMessagesByDate|getLastReceivedMessage|DebugContextProvider|useDebugContext|DebugContextValue|DebugDataType|useIsOnline|isChannelActive|scrollToFirstUnreadThreshold|deleteReactionsForMessage|useClientMutedUsers|useAppSettings|setupCommandUIMiddlewares)\b' .
rg -n -t js -t ts -g '!**/node_modules/**' '\b(geti18Instance|getAvailableLanguages|getTranslations|addOnTFunctionOverrideListener|addOnLanguageChangeListener|getTranslators|relativeCompactDateFormatter|getDateStringForA11y|(en|es|fr|he|hi|it|ja|ko|nl|ptBR|ru|tr)Translations)\b' .
rg -n -t js -t ts -t json -g '!**/node_modules/**' "'a11y/|\"a11y/" .
rg -n -t js -t ts -g '!**/node_modules/**' '\bthreadList\s*[=:,}]|\bhardDelete\s*:|\buse(MutedUsers|MutedChannels)\(\s*\w|\buse(MessageActions|MessageActionHandlers)\(\s*\{|\buseMessageList\(\{\s*threadList' .
Expand Down
7 changes: 3 additions & 4 deletions ai-docs/v10-breaking-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ Everything below was exported from the package root in v9 and is gone in v10.
- `reduceMessagesToString`, `findInMessagesById`, `findInMessagesByDate` → `channel.messagePaginator.getItem(id)` /
`jumpToMessage(id)`. — P.1
- `patchMessageTextCommand` → nothing (the composer submits through `stream-chat`). — P.17
- `setupCommandUIMiddlewares` → nothing; `stream-chat` installs the four command middlewares by default, so delete
the call. An app that never called it now gets them too: typing `/giphy cats` makes `giphy` the active command and
leaves `cats` in the input. — §13.1
- `createAttachmentsCompositionMiddleware`, `createDraftAttachmentsCompositionMiddleware`,
`localAttachmentToAttachment` → `stream-chat`'s own `createAttachmentsCompositionMiddleware` (installed by default).
— §17.6 · #3821
Expand Down Expand Up @@ -641,10 +644,6 @@ on `V10` after the guide's last update are listed first.

### #3916 (V10 @ `74884ff55`)

- `setupCommandUIMiddlewares` inserts all four middleware with `unique: true`, so running it again (the composer
setup function re-runs on every composer subscribe and every `client.config` change) replaces them rather than
stacking duplicates. A draft saved with an active command no longer comes back as `/giphy /giphy cats`. No action;
an app that calls it from its own setup function gets the fix too.
- `<ChannelList>` treats a paginator that was never queried as unloaded, so a list that mounts after
`ChannelManager.ingestChannel()` routed an event into its paginator (opened from a push notification, or a second
list such as archived channels) runs its first query instead of showing only the routed channels. — P.21
Expand Down
2 changes: 1 addition & 1 deletion examples/E2ETestApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react-native-svg": "^15.15.5",
"react-native-teleport": "^1.2.2",
"react-native-worklets": "^0.13.0",
"stream-chat": "^10.0.0-rc.30",
"stream-chat": "^10.0.0-rc.31",
"stream-chat-react-native": "workspace:^"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/ExpoChatGPTSample/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"react-native-svg": "15.15.5",
"react-native-teleport": "^1.2.2",
"react-native-worklets": "0.13.0",
"stream-chat": "^10.0.0-rc.30",
"stream-chat": "^10.0.0-rc.31",
"stream-chat-expo": "workspace:^",
"stream-chat-react-native-core": "workspace:^",
"victory-native": "^42.0.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/ExpoMessaging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"react-native-teleport": "^1.2.2",
"react-native-web": "~0.21.4",
"react-native-worklets": "0.13.0",
"stream-chat": "^10.0.0-rc.30",
"stream-chat": "^10.0.0-rc.31",
"stream-chat-expo": "workspace:^",
"stream-chat-react-native-core": "workspace:^"
},
Expand Down
3 changes: 0 additions & 3 deletions examples/SampleApp/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
createTextComposerEmojiMiddleware,
LiveLocationManagerProvider,
OverlayProvider,
setupCommandUIMiddlewares,
SqliteClient,
Streami18n,
ThemeProvider,
Expand Down Expand Up @@ -247,8 +246,6 @@ const App = () => {
// to the declarative `client.config.set()` call in `useChatClient`, next to where the client is
// created. A setup function is re-run on every configuration cycle, which is what middleware needs.
chatClient.config.setSetupFunction('messageComposer', ({ composer }) => {
setupCommandUIMiddlewares(composer);

composer.textComposer.middlewareExecutor.insert({
middleware: [
createTextComposerEmojiMiddleware({
Expand Down
2 changes: 1 addition & 1 deletion examples/SampleApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"react-native-teleport": "^1.2.2",
"react-native-video": "^6.19.3",
"react-native-worklets": "^0.13.0",
"stream-chat": "^10.0.0-rc.30",
"stream-chat": "^10.0.0-rc.31",
"stream-chat-react-native": "workspace:^",
"stream-chat-react-native-core": "workspace:^"
},
Expand Down
2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"react-native-markdown-package": "1.8.2",
"react-native-url-polyfill": "^2.0.0",
"react-syntax-highlighter": "^16.1.0",
"stream-chat": "^10.0.0-rc.30",
"stream-chat": "^10.0.0-rc.31",
"use-sync-external-store": "^1.7.0",
"zod": "^4.1.12"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,11 @@ export const ChannelPinnedMessageListProvider = ({
}: PropsWithChildren<{ channel: Channel; searchSource?: MessageSearchSource }>) => {
const { client } = useChatContext();
const [defaultSearchSource] = useState(() => {
const source = new MessageSearchSource(
client,
{ pageSize: 25, allowEmptySearchString: true, resetOnNewSearchQuery: false },
{
messageSearch: {
initialFilterConfig: {
$or: {
enabled: true,
generate: ({ searchQuery }) => (searchQuery ? { text: { $q: searchQuery } } : {}),
},
},
},
},
);
const source = new MessageSearchSource(client, {
pageSize: 25,
allowEmptySearchString: true,
resetOnNewSearchQuery: false,
});
source.messageSearchChannelFilters = { cid: channel.cid, members: undefined };
source.messageSearchFilters = { pinned: true, type: undefined };
source.activate();
Expand Down
1 change: 0 additions & 1 deletion package/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export * from './types/types';
export * from './utils/attachmentUrls';
export * from './utils/i18n/Streami18n';
export * from './i18n';
export * from './utils/setupCommandUIMiddlewares';
export * from './utils/createGenerateVideoThumbnails';
export * from './utils/utils';
export * from './nativeMultipartUpload';
Expand Down
49 changes: 0 additions & 49 deletions package/src/utils/__tests__/setupCommandUIMiddlewares.test.ts

This file was deleted.

34 changes: 0 additions & 34 deletions package/src/utils/setupCommandUIMiddlewares.ts

This file was deleted.

18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6933,7 +6933,7 @@ __metadata:
react-native-teleport: "npm:^1.2.2"
react-native-web: "npm:~0.21.4"
react-native-worklets: "npm:0.13.0"
stream-chat: "npm:^10.0.0-rc.30"
stream-chat: "npm:^10.0.0-rc.31"
stream-chat-expo: "workspace:^"
stream-chat-react-native-core: "workspace:^"
typescript: "npm:6.0.3"
Expand Down Expand Up @@ -9569,7 +9569,7 @@ __metadata:
react-native-svg: "npm:^15.15.5"
react-native-teleport: "npm:^1.2.2"
react-native-worklets: "npm:^0.13.0"
stream-chat: "npm:^10.0.0-rc.30"
stream-chat: "npm:^10.0.0-rc.31"
stream-chat-react-native: "workspace:^"
typescript: "npm:6.0.3"
languageName: unknown
Expand Down Expand Up @@ -10952,7 +10952,7 @@ __metadata:
react-native-svg: "npm:15.15.5"
react-native-teleport: "npm:^1.2.2"
react-native-worklets: "npm:0.13.0"
stream-chat: "npm:^10.0.0-rc.30"
stream-chat: "npm:^10.0.0-rc.31"
stream-chat-expo: "workspace:^"
stream-chat-react-native-core: "workspace:^"
typescript: "npm:6.0.3"
Expand Down Expand Up @@ -18558,7 +18558,7 @@ __metadata:
react-native-teleport: "npm:^1.2.2"
react-native-video: "npm:^6.19.3"
react-native-worklets: "npm:^0.13.0"
stream-chat: "npm:^10.0.0-rc.30"
stream-chat: "npm:^10.0.0-rc.31"
stream-chat-react-native: "workspace:^"
stream-chat-react-native-core: "workspace:^"
typescript: "npm:6.0.3"
Expand Down Expand Up @@ -19371,7 +19371,7 @@ __metadata:
react-syntax-highlighter: "npm:^16.1.0"
react-test-renderer: "npm:19.3.0"
rimraf: "npm:^6.0.1"
stream-chat: "npm:^10.0.0-rc.30"
stream-chat: "npm:^10.0.0-rc.31"
typescript: "npm:6.0.3"
use-sync-external-store: "npm:^1.7.0"
uuid: "npm:^11.1.0"
Expand Down Expand Up @@ -19459,9 +19459,9 @@ __metadata:
languageName: unknown
linkType: soft

"stream-chat@npm:^10.0.0-rc.30":
version: 10.0.0-rc.30
resolution: "stream-chat@npm:10.0.0-rc.30"
"stream-chat@npm:^10.0.0-rc.31":
version: 10.0.0-rc.31
resolution: "stream-chat@npm:10.0.0-rc.31"
dependencies:
"@stream-io/logger": "npm:^2.1.0"
"@stream-io/state-store": "npm:^1.2.0"
Expand All @@ -19472,7 +19472,7 @@ __metadata:
built: true
husky:
built: true
checksum: 10c0/7b37807f87081900ea407dba5fd26f8ad345ab7c7e8c4caf3b40c6bafb20a1fc56a0c7249a760d12949c700de5e633186b5c49c380f08d2c908e583d999f174f
checksum: 10c0/aa6dfa9c4b9adb6d7a3c86afe2f819e0f1f27f4903f2e29596a8e4e19ffdef7f7bc8b7fd579a9e6a25b95a4984137ce7f96557ef8932a4c4a127624a34c13374
languageName: node
linkType: hard

Expand Down
Loading