You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8ed7ea6
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: projects/stream-chat-angular/migration-guide.md
+18-12Lines changed: 18 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -212,7 +212,7 @@ The method signature is unchanged, but it now uses `stream-chat` v10's message p
212
212
213
213
### Channel preview
214
214
215
-
`ChannelPreviewComponent.latestMessage`(and `ChannelPreviewInfoContext.latestMessage`) changed from `FormatMessageResponse` to `LocalMessage` (dates are `TimestampNS`). The latest message now comes from `channel.messagePaginator`, so custom channel preview templates no longer need `message.new` / `message.updated` / `message.deleted` listeners to stay up to date.
215
+
`ChannelPreviewComponent.latestMessage`changed from `FormatMessageResponse` to `LocalMessage`, and `ChannelPreviewInfoContext.latestMessage` changed from `StreamMessage` to `LocalMessage` (dates are `TimestampNS`, and there are no `readBy` and `translation` fields). The latest message now comes from `channel.messagePaginator`, so custom channel preview templates no longer need `message.new` / `message.updated` / `message.deleted` listeners to stay up to date.
216
216
217
217
## Threads
218
218
@@ -268,6 +268,7 @@ In v10, attachment metadata moved under `attachment.custom`. This includes the f
268
268
-`DefaultAttachmentData` has two new fields, `duration` and `waveform_data`.
269
269
- If you have custom attachment templates, read the fields from their new location.
270
270
- Custom upload/delete handlers (`customImageUploadRequest`, `customFileUploadRequest`, `customImageDeleteRequest`, `customFileDeleteRequest`) are unchanged. The default upload requests now use `channel.uploadImage` / `uploadFile` (`channel.sendImage` / `sendFile` were removed in v10).
271
+
-`AttachmentListComponent` now compares attachment URLs without their query string. Attachment URLs are signed, and some message updates (for example adding a reaction) renew the signature, so `message.attachments` can change even if the attachments are the same. `AttachmentListComponent` ignores these changes, so images and videos aren't reloaded. If you display attachments with your own component instead of `stream-attachment-list`, you may want to do the same.
271
272
272
273
## Message input and drafts
273
274
@@ -302,15 +303,19 @@ v10 messages no longer have `moderation_details`. Bounced messages are detected
|`ChatClientService.appSettings$` / `AppSettings`|`AppSettings` from `stream-chat`|`AppSettings` from `stream-chat-angular` (`Partial<AppResponseFields>`) |
|`ChatClientService.appSettings$` / `AppSettings`|`AppSettings` from `stream-chat`|`AppSettings` from `stream-chat-angular` (`Partial<AppResponseFields>`) |
@@ -322,15 +327,16 @@ These changes don't require code changes, but your app may behave differently:
322
327
323
328
-**Reconnect:** after a reconnect, the SDK refreshes the channel list (same as before), and `stream-chat` reloads the active channel and the open thread. The open thread now stays open (previously it was closed because its replies weren't reloaded).
324
329
-**Message list updates:** messages arriving via WebSocket can be displayed up to 500 ms later: `stream-chat` v10 batches message list updates. Messages sent by the current user are displayed immediately.
325
-
-**Message objects:** when a message changes (for example a reaction is added), only that message gets a new object in `activeChannelMessages$`. Attachments are kept if only their (signed) URLs changed, so images and videos aren't reloaded.
330
+
-**Message objects:** when a message changes (for example a reaction is added), only that message gets a new object in `activeChannelMessages$`.
326
331
-**Hard deleted user messages:** in v10, `user.messages.deleted` events with `hard_delete` remove the messages instead of displaying a "This message was deleted" placeholder.
327
332
-**Read events:** the active channel is marked as read with `channel.markReadViaReporter()` (v9's `markRead` behavior). If read events are disabled for the channel, the SDK doesn't send read requests, and mark as unread fails with an error notification.
328
333
-**Typing events** are only sent if typing events are enabled for the channel (`channel.config.typingEvents.enabled`).
329
334
330
335
## New APIs
331
336
332
337
-`ChannelService.activeChannelMessagesPaginationState$` and `activeThreadMessagesPaginationState$`: pagination state of the message lists (`MessageListPaginationState`: `hasMoreOlder`, `hasMoreNewer`, `isLoading`, `error`).
333
-
-`ChannelService.jumpToFirstUnreadMessage()`: jumps to the first unread message of the active channel (uses `stream-chat`'s unread state).
338
+
-`ChannelService.jumpToFirstUnreadMessage()`: jumps to the first unread message of the active channel (uses `stream-chat`'s unread state). Resolves to `false` if there's nothing to jump to. If the message can't be loaded, the promise rejects and the "Message not found" notification is displayed.
339
+
-`getTranslationLanguage(channel, user)`: the language messages are translated to (the user's `language`, or the channel's `auto_translation_language`). The SDK now updates message translations when either of them changes.
334
340
-`ChannelService.reloadActiveChannelMessages()`: retries loading the messages of the active channel (for example after an error).
335
341
-`MessageListPaginationState` and `AppSettings` types.
0 commit comments