Skip to content

Conversation

@ceorourke
Copy link
Member

@ceorourke ceorourke commented Jun 12, 2021

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:

Screen Shot 2021-06-11 at 5 29 49 PM

But those with the feature see all this:
Screen Shot 2021-06-14 at 10 48 29 AM


class SlackEventMessageBuilder(BlockSlackMessageBuilder):
def build(self) -> SlackBody:
def build(self, **kwargs: Any) -> SlackBody:
Copy link
Contributor

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"
Copy link
Contributor

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()))
))

Copy link
Contributor

@mgaeta mgaeta left a 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.

@ceorourke ceorourke merged commit 0d9e60c into master Jun 15, 2021
@ceorourke ceorourke deleted the ceorourke/API-1814 branch June 15, 2021 17:27
@github-actions github-actions bot locked and limited conversation to collaborators Jul 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants