fix: resolve real_name for Slack Connect users#57
Merged
AmethystLiang merged 1 commit intostablyai:mainfrom Mar 8, 2026
Merged
fix: resolve real_name for Slack Connect users#57AmethystLiang merged 1 commit intostablyai:mainfrom
AmethystLiang merged 1 commit intostablyai:mainfrom
Conversation
For Slack Connect users (external org), the `users.info` API response does not include `real_name` at the top level — it only appears inside `profile.real_name`. This causes `user get` to return only the handle (e.g. "bob") instead of the full name (e.g. "Bob Smith"). Fall back to `profile.real_name` when the top-level field is missing. Co-Authored-By: Claude <noreply@anthropic.com>
AmethystLiang
approved these changes
Mar 8, 2026
Contributor
AmethystLiang
left a comment
There was a problem hiding this comment.
AI code review: Approved. Clean, minimal one-line fix that correctly falls back to profile.real_name for Slack Connect users. The profile variable is already safely extracted, and the fallback chain is consistent with how other fields are read in toCompactUser. No concerns — ship it.
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.
Summary
toCompactUserreadsreal_namefrom the top-levelusers.inforesponse, but for Slack Connect users (external org), the API only populatesreal_nameinsideprofile.real_nameagent-slack user getto return just the handle (e.g."bob") instead of the full name (e.g."Bob Smith") for Connect usersprofile.real_namewhen the top-level field is missingChange
One line in
src/slack/users.ts:The
profilevariable is already extracted on the line above, so this is a minimal change.How to reproduce
agent-slack user get <connect-user-id>real_nameis missing — onlyname(the handle) is returnedreal_nameis correctly populated fromprofile.real_name🤖 Generated with Claude Code