stealth-facebook 0.11.0 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bf2ef304f3c6e483aa969d7978ec498c5aab684f8a6d2f4060df92b8cf592eaf
4
- data.tar.gz: ffb4f5b2d8e8186fd4d8ccc210878dc8765796b0cf4a722853edf5692911d092
3
+ metadata.gz: 5170a3a666936248d35b276f2c89efa7b9c55e5cd182bee341ee33f8fd394cbc
4
+ data.tar.gz: 41b4beb9fc1e623434d40c4bfe73ed52c7f633596d847307029dfffc478fd4b2
5
5
  SHA512:
6
- metadata.gz: f848d03ed2e5b7c2b692c04592051891e0adba30e8259110122b633bcd4e60a1026e534006b0fa4dd60edcb0713155654b848c406f77a8c3b2eabac8e59f36dd
7
- data.tar.gz: fcbf1093cefaa3797bc3e85a421ee7742169eb499fe6035ad13491b503ba830ff82317726bc6132d57fb852b01da96e8294a26dc10b13187446c0a74acafce92
6
+ metadata.gz: c37448898fa888b0de21ed9bb87e4d6b8022545fcffbb82edb72d7006fe44bae0868594ea0131e31a89de8c9c6f5398abe715a6ebc8692900ff463948e6ab09a
7
+ data.tar.gz: 83a6e521f0b8ca6785ae86d5fc3a5594cd7b4cd6adc86f9a291f81e737b1dd9ab30779fd2605cbfae149f67c16a00e6a8c30b98495339038695f32dfd18644f9
data/README.md CHANGED
@@ -329,12 +329,12 @@ To generate a list via Stealth Facebook:
329
329
  top_element_style: large
330
330
  buttons:
331
331
  - type: payload
332
- title: View More
332
+ text: View More
333
333
  payload: view_more
334
334
  elements:
335
335
  - title: Your Daily News Update
336
336
  subtitle: The following stories have been curated just for you.
337
- image_url: "https://news-articles.com/logo.png"
337
+ image_url: "https://loremflickr.com/320/240"
338
338
  buttons:
339
339
  - type: url
340
340
  url: "https://news-articles.com/199"
@@ -342,7 +342,7 @@ To generate a list via Stealth Facebook:
342
342
  webview_height: 'tall'
343
343
  - title: Breakthrough in AI
344
344
  subtitle: Major breakthrough in the AI space.
345
- image_url: "https://news-articles.com/ai.png"
345
+ image_url: "https://loremflickr.com/320/320"
346
346
  default_action:
347
347
  - url: "https://news-articles.com/232"
348
348
  webview_height: 'tall'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.0
1
+ 0.11.1
@@ -147,14 +147,14 @@ module Stealth
147
147
  )
148
148
 
149
149
  fb_elements = generate_list_elements(elements: reply["elements"])
150
- template["message"]["attachments"]["payload"]["elements"] = fb_elements
150
+ template["message"]["attachment"]["payload"]["elements"] = fb_elements
151
151
 
152
152
  if reply["buttons"].present?
153
153
  if reply["buttons"].size > 1
154
154
  raise(ArgumentError, "Facebook lists support a single button attached to the list itsef.")
155
155
  end
156
156
 
157
- template["message"]["attachments"]["payload"]["buttons"] = generate_buttons(buttons: reply["buttons"])
157
+ template["message"]["attachment"]["payload"]["buttons"] = generate_buttons(buttons: reply["buttons"])
158
158
  end
159
159
 
160
160
  template
@@ -249,7 +249,7 @@ module Stealth
249
249
  raise(ArgumentError, "Facebook list replies only support 'large' or 'compact' as the top_element_style.")
250
250
  end
251
251
 
252
- template["message"]["payload"]["top_element_style"] = top_element_style
252
+ template["message"]['attachment']["payload"]["top_element_style"] = top_element_style
253
253
  end
254
254
 
255
255
  if buttons.present?
@@ -281,7 +281,7 @@ module Stealth
281
281
  end
282
282
 
283
283
  if element["default_action"].present?
284
- default_action = generate_default_action(action_params: element["default_action"])
284
+ default_action = generate_default_action(action_params: element["default_action"].first)
285
285
  template["default_action"] = default_action
286
286
  end
287
287
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stealth-facebook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mauricio Gomes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-24 00:00:00.000000000 Z
11
+ date: 2018-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stealth