flow_chat 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38bdb327e3213bbb5ca4986453b395fc7d4df7666a9e5c251469ded12bea90a7
4
- data.tar.gz: f0b6d567e4f75a8945d5e125cc2198396b06827d8f212c7e6a38894a78110c6a
3
+ metadata.gz: 4a04a5ad026a67e7ce71aa0a22a3b5522da80cf0da4552280853154e91bc1a27
4
+ data.tar.gz: 515908f7a643eb53dd7ce542aa7005f54eb1127b640b4d3b834f1891137a2d16
5
5
  SHA512:
6
- metadata.gz: 578743345bb3a509551f4cdb72d487e565a1a93bd8410a7f0b1664dabe8f5da8f5e6b96991e8108e363124e004ea9d4cb8baa5c9e6d5abc9d4c3df6cd995a287
7
- data.tar.gz: 6faf7ccb278d68559ba4cd5581d33b86e871f8dac764607d46dfebe39f86e2e4266f0369380e177f3969723083a94bb000dd3411a573e52cd17b84a7f9b3dc6a
6
+ metadata.gz: 515db13100618aa0150672a08c960ef08c6661171e926694580c91d3a9d5dc1decf2b6698ae6beca128ae24b3ee314779e82fec3f37a16b97aa5a3e96157b04a
7
+ data.tar.gz: a1846f20afce50943626bb5c0c617e4e7d5a6fa445d9cd0be4fdfaf5438ab29b3201b6e4c3e90cd9d73feef16bac2607017f0fa8cea5a6b472feb5213a25227a
@@ -4,7 +4,7 @@ module FlowChat
4
4
  class BaseProcessor
5
5
  attr_reader :middleware
6
6
 
7
- def initialize(controller, enable_simulator: false)
7
+ def initialize(controller, enable_simulator: nil)
8
8
  @context = FlowChat::Context.new
9
9
  @context["controller"] = controller
10
10
  @context["enable_simulator"] = enable_simulator.nil? ? (defined?(Rails) && Rails.env.local?) : enable_simulator
@@ -1331,7 +1331,8 @@
1331
1331
  const response = await fetch(config.endpoint, {
1332
1332
  method: 'POST',
1333
1333
  headers: { 'Content-Type': 'application/json' },
1334
- body: JSON.stringify(requestData)
1334
+ body: JSON.stringify(requestData),
1335
+ credentials: 'include'
1335
1336
  })
1336
1337
 
1337
1338
  const data = await response.json()
@@ -1426,7 +1427,8 @@
1426
1427
  const response = await fetch(config.endpoint, {
1427
1428
  method: 'POST',
1428
1429
  headers: { 'Content-Type': 'application/json' },
1429
- body: JSON.stringify(webhookData)
1430
+ body: JSON.stringify(webhookData),
1431
+ credentials: 'include'
1430
1432
  })
1431
1433
 
1432
1434
  // Read the response body once and store it
@@ -1,3 +1,3 @@
1
1
  module FlowChat
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
data/lib/flow_chat.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "zeitwerk"
2
2
  require "active_support"
3
3
  require "active_support/core_ext/time"
4
+ require "active_support/core_ext/object/blank"
4
5
 
5
6
  loader = Zeitwerk::Loader.for_gem
6
7
  loader.enable_reloading if defined?(Rails.env) && Rails.env.development?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flow_chat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich