-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: slash command slackbot to respond in private msg #5151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Summary
This PR fixes the Slack bot's slash command behavior to send responses as ephemeral (private) messages by default. The change modifies the logic in handle_regular_answer.py
that determines when Slack bot responses should be ephemeral.
The key change is in the send_as_ephemeral
condition, which previously used AND logic requiring both channel configuration AND bot message status. Now it uses OR logic, meaning slash commands (/onyx
) will always trigger ephemeral responses unless it's a direct message to the bot.
This aligns with standard Slack UX patterns where slash command responses are typically private to the invoking user rather than visible to the entire channel. The change preserves the exception for direct messages since DMs are already private by nature. The modification integrates with the existing Slack bot infrastructure that uses the SlackMessageInfo
model to track message metadata including the is_bot_msg
flag that identifies slash command usage.
Confidence score: 4/5
- This PR is safe to merge with minimal risk as it's a targeted UX improvement for slash commands
- Score reflects a simple logical change with clear intent and preserved existing behavior for edge cases
- No files require special attention as the change is isolated to a single conditional statement
1 file reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cubic analysis
No issues found across 1 file. Review in cubic
* fix slash command slackbot to respond in private msg * rename confusing variable. fix slash message response in DMs
Description
How Has This Been Tested?
locally
Backporting (check the box to trigger backport action)
Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.