chatinfo: don't use batch user resync queue for bot IDs#77
Open
iFixRobots wants to merge 1 commit intomainfrom
Open
chatinfo: don't use batch user resync queue for bot IDs#77iFixRobots wants to merge 1 commit intomainfrom
iFixRobots wants to merge 1 commit intomainfrom
Conversation
B-prefix bot/app IDs were being routed to the batch user resync queue on cookie-based logins. GetUsersCacheContext is a users-only API that silently ignores bot IDs, so IsBot was never set and is_network_bot was permanently false for all Slack app ghosts. Skip the queue for B-prefix IDs so they fall through to fetchUserInfo, which correctly calls GetBotInfoContext and sets isBot = true.
tulir
approved these changes
Apr 22, 2026
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.
Problem
B-prefix bot/app ghost IDs (e.g.
BGT7QUP3Lfor Google Drive) on cookie-based logins (IsRealUser = true) never getIsBotset totrue, socom.beeper.bridge.is_network_botis permanentlyfalse.This causes clients to include Slack app bots in
nonBotMembers, making them appear as the DM partner instead of the actual human contact.Cause
GetUserInfounconditionally routes all named ghosts touserResyncQueueon cookie-based logins. The queue consumer callssyncManyUsers→GetUsersCacheContext, which is a users-only Slack API that silently ignores B-prefix bot IDs. SowrapUserInfois never called for bots andIsBotstaysfalse.The correct path (
fetchUserInfo→GetBotInfoContext) exists but is dead code for cookie logins once a ghost has a name.Fix
Skip the batch queue for B-prefix IDs so they fall through to
fetchUserInfo, which correctly callsGetBotInfoContextand setsisBot = true. This matches the existinguserID[0] == 'B'check already used infetchUserInfo(line 432).