Skip to content

Commit 0ce771c

Browse files
committed
Add https proxy support
1 parent 1c49569 commit 0ce771c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"url": "https://github.com/slackhq/hubot-slack/issues"
2323
},
2424
"dependencies": {
25-
"slack-client": "~1.4.0"
25+
"slack-client": "~1.5"
2626
},
2727
"devDependencies": {
2828
"coffee-script": "~1.7.1",

src/slack.coffee

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ class SlackBot extends Adapter
2222
autoReconnect: !exitProcessOnDisconnect
2323
autoMark: true
2424
exitOnDisconnect: exitProcessOnDisconnect
25+
proxyUrl: process.env.https_proxy
2526

2627
return @robot.logger.error "No services token provided to Hubot" unless options.token
2728
return @robot.logger.error "v2 services token provided, please follow the upgrade instructions" unless (options.token.substring(0, 5) in ['xoxb-', 'xoxp-'])
2829

2930
@options = options
3031

3132
# Create our slack client object
32-
@client = new SlackClient options.token, options.autoReconnect, options.autoMark
33+
@client = new SlackClient options.token, options.autoReconnect, options.autoMark, options.proxyUrl
3334

3435
# Setup event handlers
3536
# TODO: Handle eventual events at (re-)connection time for unreads and provide a config for whether we want to process them

0 commit comments

Comments
 (0)