-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Slash callback configuration in frontend #5732
Comments
@soundstorm our integrations have similar capabilities, with the option for you to add a JavaScript class that will be executed before hand. This way you can do pretty much anything you want. Take a look at https://rocket.chat/docs/administrator-guides/integrations/#outgoing-webhook-scripting @graywolf336 can we take a look and map the Slack slash commands to add to our compatibility effort? |
@engelgabriel just created a bot reacting to direct messages. A regular outgoing web hook AFAIK can only listen on public, private OR direct messages. A slash command works (or should work) everywhere. While you can assign any keyword to listen for, anything starting with a slash is impossible. BTW: the custom hubot documentation is empty :/ |
@soundstorm I know this is old, but for anyone else wondering a regular outgoing webhook can listen on every channel type - public, private, and direct messages. :) |
Currently there is only support for slash commands in distributed in packages (and only loaded after restarting the server, correct me, if I'm wrong).
Slack features - nearly from the beginning on - a simple way to configure a slash command via the frontend, without needing packages and restarts. What they do? Simply take a command
/cmd params[]
and create a POST or GET to a given server address.A token is transferred too, to verify the payload. Params (POST/GET) are as follow (copy from the slack site):
The body replied from the requested URL is then shown in the same context (channel where the message was sent from, so current window), but only visible to the person, who posted the message (only temporary cached message, if restarting the app or closing the window the message from the bot is gone).
But as we don't want to simply copy something, let's do it a bit better:
Add an (optional) incoming web hook url in payload (e.g. a
/notify @user 12:00
command that simply sends a message (via incoming wh) to the user at 12 o'clock; I use it for internal orders, so/order add @other_user item
adds the item to a list, confirms that the order has been placed to the user and sends a notification to other_user, currently this was a hardcoded incoming wh url for slack).It's something like hubot, but simply reduced to a slash command and adds some backwards compatibility to Slack.
The text was updated successfully, but these errors were encountered: