Skip to content
This repository was archived by the owner on May 30, 2026. It is now read-only.

fix(reducer): preserve relationship IDs when backend sends null#934

Open
RajanChavada wants to merge 1 commit into
smallcloudai:mainfrom
RajanChavada:main
Open

fix(reducer): preserve relationship IDs when backend sends null#934
RajanChavada wants to merge 1 commit into
smallcloudai:mainfrom
RajanChavada:main

Conversation

@RajanChavada
Copy link
Copy Markdown

Use ?? operator for parent_id, link_type, and root_chat_id in applyRestoredThread to match the pattern used in the snapshot event handler (lines 1331-1333).

Previously, valueOrExisting would allow null to overwrite existing relationship IDs, breaking parent/child chat relationships when the backend sent null for these fields.

The ?? operator correctly treats null as "keep existing value" rather than "overwrite with null", consistent with how SSE snapshot events handle the same backend fields.

Use `??` operator for parent_id, link_type, and root_chat_id in
applyRestoredThread to match the pattern used in the snapshot event
handler (lines 1331-1333).

Previously, valueOrExisting would allow null to overwrite existing
relationship IDs, breaking parent/child chat relationships when the
backend sent null for these fields.

The ?? operator correctly treats null as "keep existing value" rather
than "overwrite with null", consistent with how SSE snapshot events
handle the same backend fields.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant