Socket
Socket
Sign inDemoInstall

hubot-slack

Package Overview
Dependencies
0
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.0 to 2.1.1

2

package.json
{
"name": "hubot-slack",
"version": "2.1.0",
"version": "2.1.1",
"author": {

@@ -5,0 +5,0 @@ "name": "Tiny Speck",

@@ -10,3 +10,3 @@ # hubot-slack

- `npm install hubot -g`
- `npm install -g hubot coffee-script`
- `hubot --create [path_name]`

@@ -76,1 +76,35 @@ - `cd [path_name]`

Optional. By default, Slack will not linkify channel names (starting with a '#') and usernames (starting with an '@'). You can enable this behavior by setting HUBOT_SLACK_LINK_NAMES to 1. Otherwise, defaults to 0. See [Slack API : Message Formatting Docs](https://api.slack.com/docs/formatting) for more information.
## Under the Hood
#### Receiving Messages:
The slack adapter adds a path to the robot's router that will accept POST requests to:
`/hubot/slack-webhook`
Source: [https://github.com/tinyspeck/hubot-slack/blob/2.1.0/src/slack.coffee#L149-L165](https://github.com/tinyspeck/hubot-slack/blob/2.1.0/src/slack.coffee#L149-L165)
Expected parameters:
- text
- user_id
- user_name
- channel_id
- channel_name
If there is a message and it can deduce an author from those paramters, it'll create a new [TextMessage](https://github.com/github/hubot/blob/v2.7.2/src/message.coffee#L14) object and have the robot receive it, from there proceeding down the regular hubot path.
#### Sending Messages
When a script calls `send()` or `reply()` this adapter makes a POST request to your team's specific URL webhook:
`https://<your_team_name>.slack.com/services/hooks/hubot`
with a JSON-formatted body including the following dictionary:
- username
- channel
- text
- link_names (optionally)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc