Repository navigation
feat(conversations): Slack-backed private Conversations follow channel membership - #4373
sentry-junior[bot] wants to merge 4 commits into
Conversation
…l membership A private Conversation in a Slack channel, DM, or group DM now follows who is in it now, checked live with conversations.members. A person removed from the channel loses access, and a member who never posted can read and post. Answers are shared for 60 seconds, and a failed check denies access. Refs #2679 Co-Authored-By: David Cramer <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…nstallation Load the Slack app lazily so access checks don't pull it into every importer, and answer conversations.members in the eval Slack fixture. Refs #2679 Co-Authored-By: David Cramer <[email protected]>
Co-Authored-By: David Cramer <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0a4eabb. Configure here.
| adapter: getProductionSlackAdapter(), | ||
| installation: { teamId }, | ||
| task: () => isConversationMember(channelId, userId), | ||
| }); |
There was a problem hiding this comment.
Large channels deny current members
Medium Severity
Access now treats isConversationMember as the source of truth, but that helper only walks five conversations.members pages (5000 users) and returns false when the viewer is later in the list. A current member of a large private channel is then denied the Conversation, and that false is cached for 60 seconds.
Reviewed by Cursor Bugbot for commit 0a4eabb. Configure here.
|
Oh, this is a nice safety. I would prefer to not have to query Slack all the time to answer these kinds of questions, especially as we're moving this into a many to many table. That means really the slack events somehow need to influence the relationships in the table, and then there probably needs to be a function that can sync it if it gets out of sync or something along those lines |
|
Makes sense. Here's the shape I'd build:
Should I rework this PR to that, or merge this one as-is and do the event-driven version next? |
…mbership # Conflicts: # packages/junior/tests/integration/api/conversations/subscription.test.ts # policies/conversation-access.md
|
Closing without merging. The gap is small, and asking Slack on every read is the wrong shape. Tracking it in #2679. |
|
1 screenshot change — 1 changed · 0 added · 0 removed Review screenshots in Frameshift
|


A private Conversation in a Slack channel, DM, or group DM now follows the people who are in it now, not the people who once posted there.
How it works:
api/conversations/slack-audience.tsasks Slack (conversations.members, through the bot's installation) whether any of the viewer's linked Slack accounts in that workspace is in the channel.conversation_access.slack_membership.unavailable.conversationAccessFromRowsuses the answer for Slack-backed private rows in the detail, the feed, and posting (canAddConversationMessages).Policy: one line in
policies/conversation-access.md.Addresses #2679
via @dcramer.
--
View Session [Sentry]