Skip to content

Unjoined public channel is reported as a private channel #61

Description

@lmjabreu

What happened. tdc thread view id:Cef56SqAhC6dgFNn5R4f4 (a thread in a public channel I have not joined) fails with:

NOT_FOUND: This thread belongs to a private channel.
Use --include-private-channels to access it

With the flag it reads fine, and the channel is public.

Why. assertChannelIsPublic checks the channel id against getPublicChannelIds, which is built from client.channels.getChannels({ workspaceId }) (src/lib/public-channels.ts). That list did not contain the channel for me, so anything outside it is reported as private, joined or not. Comms has two levels here, private and public-not-yet-joined, and the message only names one.

Ask. Either of these; the first is enough on its own:

  1. Reword the error to what the check actually knows: "This thread is in a channel you have not joined, or a private one. Pass --include-private-channels to read it."
  2. Check the channel itself (its public flag) so an unjoined public channel passes the guard without the flag, and only private ones need it.

Why it matters. Agents relay this message as a fact. Mine told me the thread was private twice, once inside a draft reply that warned colleagues the link would not work for them. Version 3.1.0.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions