Skip to content

fix(core): initialize chat receivers for each topic - #1449

Open
fatihcvs wants to merge 1 commit into
livekit:mainfrom
fatihcvs:fix/chat-multiple-topics
Open

fatihcvs wants to merge 1 commit into
livekit:mainfrom
fatihcvs:fix/chat-multiple-topics

Conversation

@fatihcvs

Copy link
Copy Markdown

Calling setupChat for two different channelTopic values in the same room only installs receivers for the first topic. The second topic gets a subject but no text/byte stream handlers or legacy data-message subscription, so its incoming messages never reach subscribers.

Check whether the topic exists in the room's topic map, instead of whether the room exists in the outer map. Repeated setup for the same topic still reuses its receivers.

Validation:

  • Two regression tests fail on the original code and pass with the fix. They cover separate legacy channels, repeated setup without duplicate delivery/registration, a second text-stream channel, disconnect cleanup, and setting up both channels again.
  • Tests use a real SDK Room and its events/registration methods, with an async-iterator reader test double for text chunks. They do not connect to a LiveKit server.
  • All 120 core/react/styles tests pass; pnpm build:react, core lint (14 existing warnings), pnpm format:check, and React API check pass.

Includes a core patch changeset. Developed and verified with OpenAI Codex assistance.

@changeset-bot

changeset-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 197634f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@livekit/components-core Patch
@livekit/components-react Patch
@livekit/agents-ui Patch
@livekit/component-example-next Patch
@livekit/components-js-docs Patch
@livekit/component-docs-storybook Patch
@livekit/components-docs-gen Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Sep 19, 2026

Copy link
Copy Markdown

@fatihcvs is attempting to deploy a commit to the LiveKit Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant