connector: resolve Slack user group mention handles - #92
Open
0x-chad wants to merge 2 commits into
Open
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.
Built on #91. Until #91 merges, GitHub shows both commits in this PR; after it merges, this PR becomes the resolver-only follow-up.
What this adds
usergroups.listonly when an unlabeled user-group mention must be resolved.<!subteam^ID>form when no handle can be resolved.usergroups:readto the bot app manifest.This does not add a synchronous lookup during connection startup or subscribe to user-group events. The first unlabeled group mention may perform one bounded lookup; cache hits do not call Slack.
Authentication impact
Cookie-backed
xoxcuser sessions were tested againstusergroups.listsuccessfully and do not use the bot app manifest. Existingxoxbbot installations must be reauthorized/reinstalled to grant the newusergroups:readscope.Verification
go test -count=1 ./pkg/connector ./pkg/msgconv/...go test -race -count=1 ./pkg/connector ./pkg/msgconv/...go vet ./pkg/connector ./pkg/msgconv/...Tests cover embedded labels, resolved and unresolved mrkdwn mentions, rich-text user-group elements, cache hits and expiry, stale-data retention, retry backoff, and canceled contexts.