-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(notifications platform): More robust message tab reply #26581
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
d8e66d2 to
2666382
Compare
|
|
||
| class SlackEventMessageBuilder(BlockSlackMessageBuilder): | ||
| def build(self) -> SlackBody: | ||
| def build(self, **kwargs: Any) -> SlackBody: |
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.
Move the integration parameter from the build method to the constructor:
def __init__(self, integration: Integration) -> None:
super().__init__()
self.integration = integration
|
|
||
| HEADER_MESSAGE = "Here are the commands you can use. Commands not working? Re-install the app!" | ||
| DM_COMMAND_HEADER = "*Direct Message Commands:*" | ||
| DM_COMMANDS_MESSAGE = "• `/sentry link`: Link your Slack account to Sentry \n • `/sentry unlink`: Unlink your Slack account from Sentry\n • `/sentry help`, `help`: View this list of commands" |
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.
You should make a mapping of commands to descriptions that we can reuse and then do something like:
DM_COMMANDS_MESSAGE = "\n".join((
f"• `/sentry {command}`: {description}"
for command, description in sorted(tuple(AVAILABLE_COMMANDS.items()))
))
mgaeta
left a comment
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.
I left comments about 2 changes.
Add a lot more information to the Sentry Slack app message tab reply (this replies to anything typed in the message tab) to let users know about the new functionality. This is feature flagged so users without the feature still see this:
But those with the feature see all this:
