slacks 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/slacks/connection.rb +16 -2
- data/lib/slacks/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: f5dca8b35462a36816d2ac22a58904c7801e779d
|
4
|
+
data.tar.gz: ea16047ea5dbafc775bbb6d79bdd30c85446aec8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 423b632d2810deaac520ea364122ff15030876e66dacdde761d957bd7bd8cabd8caaa6d7d0a1a33293bec184f16e8fe051be35eb94291c595cc28f78857e1a54
|
7
|
+
data.tar.gz: 889dc9cbc90679e968006aebeac2c798981aa0dde9873e3c14bb4e21da3ab19a3756d2da0a27ee085f298c725f5db16c5bd8f53350a987c9ddad5f58c0fa0fa1
|
data/lib/slacks/connection.rb
CHANGED
@@ -41,8 +41,7 @@ module Slacks
|
|
41
41
|
as_user: true, # post as the authenticated user (rather than as slackbot)
|
42
42
|
link_names: 1} # find and link channel names and user names
|
43
43
|
params.merge!(attachments: MultiJson.dump(attachments)) if attachments.any?
|
44
|
-
params.merge!(options.select { |key, _|
|
45
|
-
:unfurl_links, :unfurl_media, :icon_url, :icon_emoji].member?(key) })
|
44
|
+
params.merge!(options.select { |key, _| SEND_MESSAGE_PARAMS.member?(key) })
|
46
45
|
api("chat.postMessage", params)
|
47
46
|
rescue Slacks::ResponseError
|
48
47
|
$!.response
|
@@ -347,5 +346,20 @@ module Slacks
|
|
347
346
|
end
|
348
347
|
end
|
349
348
|
|
349
|
+
|
350
|
+
|
351
|
+
SEND_MESSAGE_PARAMS = %i{
|
352
|
+
username
|
353
|
+
as_user
|
354
|
+
parse
|
355
|
+
link_names
|
356
|
+
unfurl_links
|
357
|
+
unfurl_media
|
358
|
+
icon_url
|
359
|
+
icon_emoji
|
360
|
+
thread_ts
|
361
|
+
reply_broadcast
|
362
|
+
}.freeze
|
363
|
+
|
350
364
|
end
|
351
365
|
end
|
data/lib/slacks/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slacks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Lail
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: websocket-driver
|