Skip to content

fix: serialize getting message types to avoid slack rate limits#97

Merged
korotovsky merged 1 commit intokorotovsky:masterfrom
orinciog:channel_limits
Sep 22, 2025
Merged

fix: serialize getting message types to avoid slack rate limits#97
korotovsky merged 1 commit intokorotovsky:masterfrom
orinciog:channel_limits

Conversation

@orinciog
Copy link
Contributor

Fixes #31

It serializes the calls for each of slack message types.
Now the limit of GetConversationsParameters is respected (otherwise, if we requested all messages from slack, each call would have maximum 10 entries (see #31 (comment) for more details)

}

var chans []Channel
for _, t := range AllChanTypes {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should not this line be range channelTypes {?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... I can explain how it happened and you might improve it in this PR? Basically background goroutine must fetch all channels of all types no matter what to provide consistent cache, before cache was introduced this function getChannels() have been used directly from tool handler with parameter channel types provided from the user.

@korotovsky korotovsky merged commit 7fba32b into korotovsky:master Sep 22, 2025
2 checks passed
redaphid pushed a commit to redaphid/slack-mcp-server that referenced this pull request Nov 24, 2025
fix: serialize getting message types to avoid slack rate limits
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.

For large numbers of channels, slack is rate limiting requests

3 participants