Repository navigation
fix(client): pass connectionId through instead of clientKey - #69
Merged
Merged
Conversation
The CourierClient constructor set `connectionId: props.clientKey`, so a caller-supplied connectionId was dropped and the native client received the client key (or undefined under JWT auth) as its socket connection id. Adds tests covering connectionId passthrough and the undefined default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mikemilla
added a commit
that referenced
this pull request
Oct 1, 2026
The deploy job ran on Node 20 and upgraded to npm@latest. npm 12 requires Node ^22.22.2 || ^24.15.0 || >=26, so the Upgrade npm step failed with EBADENGINE and 6.0.5 never published (runs on #67 and #69). Use .nvmrc (v22), matching CI, and pin npm 11 (>= 11.5.1 for trusted publishing; supports Node ^20.17.0 || >=22.9.0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mikemilla
added a commit
that referenced
this pull request
Oct 1, 2026
The deploy job ran on Node 20 and upgraded to npm@latest. npm 12 requires Node ^22.22.2 || ^24.15.0 || >=26, so the Upgrade npm step failed with EBADENGINE and 6.0.5 never published (runs on #67 and #69). Use .nvmrc (v22), matching CI, and pin npm 11 (>= 11.5.1 for trusted publishing; supports Node ^20.17.0 || >=22.9.0). Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
CourierClient's constructor mappedconnectionIdfrom the wrong prop:This meant any
connectionIdpassed tonew CourierClient({ ... })was ignored. The iOS (ios/CourierClientModule.swift:26) and Android (CourierClientModule.kt:51) modules readconnectionIddirectly from the options, so native received the client key as the socket connection ID, orundefinedunder JWT-only auth.The bug has been there since the low-level client landed in Aug 2024 (
7dbbb31). Impact is likely low in practice because RN uses the native inbox components, which generate their own connection ID.Changes
src/client/CourierClient.tsx: useprops.connectionId.src/__tests__/courier-client.test.tsx: two tests, one thatconnectionIdreachesaddClientandoptions, and one that it staysundefinedwhen omitted. Both fail on the old code.Testing
yarn test: 133/133 passingeslinton changed files: cleantsc --noEmit: cleanNo version bump.
mainis already at 6.0.5 (unreleased), so this can ship with it.🤖 Generated with Claude Code