ruboty-slack_rtm 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/ruboty/adapters/slack_rtm.rb +2 -1
- data/lib/ruboty/slack_rtm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1090e04cb0f01da553baaca992e576301e0918e
|
4
|
+
data.tar.gz: ea0e5070e4e166cacfcf114beb4cae62351d4830
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fa3aabae40d573423a644e68b53206f526df35be109b44f5c7cef4e3ec58ffe78abc5e7a7965fb7e568980b11cc8bb0ad249209d1744b344b156c29488abc22
|
7
|
+
data.tar.gz: de9b0c893576cbab5bc00da4eb38effcac03c06196bff99c839804182e97d4fd3458bf4b72a2175902e0b0f56128c52c7334a0abb9a15ab17c01d3ac3d36b31e
|
data/README.md
CHANGED
@@ -15,6 +15,7 @@ gem 'ruboty-slack_rtm'
|
|
15
15
|
- `SLACK_TOKEN`: Account's token. get one on https://api.slack.com/web#basics
|
16
16
|
- `SLACK_EXPOSE_CHANNEL_NAME`: if this set to 1, `message.to` will be channel name instead of id (optional)
|
17
17
|
- `SLACK_IGNORE_GENERAL`: if this set to 1, bot ignores all messages on #general channel (optional)
|
18
|
+
- `SLACK_GENERAL_NAME`: Set general channel name if your Slack changes general name (optional)
|
18
19
|
|
19
20
|
This adapter doesn't require a real user account. Using with bot integration's API token is recommended.
|
20
21
|
See: https://api.slack.com/bot-users
|
@@ -10,6 +10,7 @@ module Ruboty
|
|
10
10
|
env :SLACK_TOKEN, "Account's token. get one on https://api.slack.com/web#basics"
|
11
11
|
env :SLACK_EXPOSE_CHANNEL_NAME, "if this set to 1, message.to will be channel name instead of id", optional: true
|
12
12
|
env :SLACK_IGNORE_GENERAL, "if this set to 1, bot ignores all messages on #general channel", optional: true
|
13
|
+
env :SLACK_GENERAL_NAME, "Set general channel name if your Slack changes general name", optional: true
|
13
14
|
|
14
15
|
def run
|
15
16
|
init
|
@@ -97,7 +98,7 @@ module Ruboty
|
|
97
98
|
channel = channel_info(data['channel'])
|
98
99
|
|
99
100
|
if channel
|
100
|
-
return if channel['name'] == 'general' && ENV['SLACK_IGNORE_GENERAL'] == '1'
|
101
|
+
return if channel['name'] == (ENV['SLACK_GENERAL_NAME'] || 'general') && ENV['SLACK_IGNORE_GENERAL'] == '1'
|
101
102
|
|
102
103
|
channel_to = expose_channel_name? ? "##{channel['name']}" : channel['id']
|
103
104
|
else # direct message
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-slack_rtm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Kusano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|