stealth 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/stealth/services/facebook/reply_handler.rb +15 -11
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4d8bf015a587aee5dd4f1da0a2cddc1317036d3
|
4
|
+
data.tar.gz: a8d3888b2532d9504bcdbf0049a31354f02ab493
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a97b02e1818c1b0d465d3910a5fec85b24c3ce030da4cbe07adcf23008e2daeceacec1a33209710da67b24679b3e1cd0061a460db40fba8c93eae390be36d224
|
7
|
+
data.tar.gz: adfa7be72b22fe1d4d8cef6933a6ef3cf5213ef2ef531f6a17f2bbf7962d1343a3f0f34529234a490189d71154572201cf305cbbfbad93a760bacd4e2b79af05
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.3
|
@@ -131,7 +131,7 @@ module Stealth
|
|
131
131
|
)
|
132
132
|
|
133
133
|
fb_elements = generate_card_elements(elements: reply["details"]["elements"])
|
134
|
-
template["message"]["
|
134
|
+
template["message"]["attachment"]["payload"]["elements"] = fb_elements
|
135
135
|
|
136
136
|
template
|
137
137
|
end
|
@@ -202,10 +202,12 @@ module Stealth
|
|
202
202
|
"id" => recipient_id
|
203
203
|
},
|
204
204
|
"message" => {
|
205
|
-
"
|
206
|
-
|
207
|
-
"
|
208
|
-
|
205
|
+
"attachment" => {
|
206
|
+
"type" => "template",
|
207
|
+
"payload" => {
|
208
|
+
"template_type" => "generic",
|
209
|
+
"elements" => []
|
210
|
+
}
|
209
211
|
}
|
210
212
|
}
|
211
213
|
}
|
@@ -227,10 +229,12 @@ module Stealth
|
|
227
229
|
"id" => recipient_id
|
228
230
|
},
|
229
231
|
"message" => {
|
230
|
-
"
|
231
|
-
|
232
|
-
"
|
233
|
-
|
232
|
+
"attachment" => {
|
233
|
+
"type" => "template",
|
234
|
+
"payload" => {
|
235
|
+
"template_type" => "list",
|
236
|
+
"elements" => []
|
237
|
+
}
|
234
238
|
}
|
235
239
|
}
|
236
240
|
}
|
@@ -255,8 +259,8 @@ module Stealth
|
|
255
259
|
end
|
256
260
|
|
257
261
|
def element_template(element_type:, element:)
|
258
|
-
unless element["
|
259
|
-
raise(ArgumentError, "Facebook card and list elements must have a '
|
262
|
+
unless element["title"].present?
|
263
|
+
raise(ArgumentError, "Facebook card and list elements must have a 'title' attribute.")
|
260
264
|
end
|
261
265
|
|
262
266
|
template = {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stealth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mauricio Gomes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -231,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
231
|
version: '0'
|
232
232
|
requirements: []
|
233
233
|
rubyforge_project:
|
234
|
-
rubygems_version: 2.6.
|
234
|
+
rubygems_version: 2.6.11
|
235
235
|
signing_key:
|
236
236
|
specification_version: 4
|
237
237
|
summary: Ruby framework for conversational bots
|