feat!: move to timestamps in response models - #3794
Merged
Merged
Conversation
szuperaz
marked this pull request as ready for review
September 1, 2026 07:45
- Four row-to-model mappers assigned number | undefined to created_at and updated_at, which the response models declare required. The trailing ...JSON.parse(extraData) spread is `any`, which disables assignability checking for the whole literal, so tsc could not see it. They now use ?? 0, matching the six sibling mappers. mapStorableToUser.role had the same problem. - MessageList: convert the resync gate left as truthiness, while its byte-identical twin in MessageFlashList was already converted. A created_at of 0 skipped the scroll-to-bottom, pagination reset, and mark-read. - SampleApp: restore the guarded convertTimestampToDate in MessageSearchList, which had been swapped for the unguarded nsToDate, and fix the || on first_reaction_at that the same sweep missed one file over. Adds mapperRequiredTimestamps.test.ts, verified to fail when the guards are reverted, and records the any-spread trap on mapStorableToTimestamp.
oliverlaz
approved these changes
Sep 3, 2026
Contributor
SDK Size
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relevant stream-chat-js PR: GetStream/stream-chat-js#1849
Breaking changes
findInMessagesByDatetakes a timestamp, not a DateOfflineStoreApis.deleteMessagesForChanneltruncation cursor is now a timestamp not aDateobjectDB schema is also updated and stores dates as
integerrather thanstring.The change can produce runtime errors not caught by TS compiler; integrators should check their code for these potential issues: