Repository navigation
Use public-only message search in safe mode - #29
Merged
Merged
Conversation
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.
Safe-search mode filtered private message matches after a legacy search, while pagination still described the wider result set. Use Slack's public-channel search boundary before results are paginated.
assistant.search.contextwith fixedchannel_types: ["public_channel"]andcontent_types: ["messages"]. User query modifiers cannot change these request parameters.slack-public-search-v1response containing public matches and an opaque cursor. Do not return legacy totals, pages, ranks, context messages, or other result types.cursorandlimit(1–20) in safe mode; reject legacypageandcountparameters. Leave normal, unrestricted mode on the legacy API.The user token needs
search:read.publicand access to Slack's Real-time Search API. Reauthorize the Slack app with the required scope before deploying this server update, then update clients that enforce the new response contract. Existing deployments and authorization have not been changed by this PR.Validation: 16 tests on Node 20.20.2,
npm run lint,npm run build, andgit diff --checkpass. The original safe-search implementation fails the new public-boundary tests. Tests use fake API responses and do not call a real workspace.API reference:
Slack assistant.search.context