summaryrefslogtreecommitdiff
path: root/controllers/instance.rb
diff options
context:
space:
mode:
authoricebaker <icebaker@proton.me>2023-06-03 19:13:26 -0300
committericebaker <icebaker@proton.me>2023-06-03 19:13:26 -0300
commitcb8a84a60773cfe9e7fab03d93fc6430e4574351 (patch)
tree27839477aafb56128804393a328c94d341d5b394 /controllers/instance.rb
parent2c50a06b68a21ce904e5dfd15833e3569ff64bfa (diff)
add cryptography to state and user identifiers
Diffstat (limited to 'controllers/instance.rb')
-rw-r--r--controllers/instance.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/controllers/instance.rb b/controllers/instance.rb
index a982261..d4e0c1b 100644
--- a/controllers/instance.rb
+++ b/controllers/instance.rb
@@ -13,14 +13,16 @@ require_relative './session'
module NanoBot
module Controllers
class Instance
- def initialize(cartridge_path:, stream:, state: nil)
+ def initialize(cartridge_path:, stream:, state: nil, environment: {})
@stream = stream
load_cartridge!(cartridge_path)
- provider = Components::Provider.new(@cartridge[:provider])
+ provider = Components::Provider.new(@cartridge[:provider], environment:)
- @session = Session.new(provider:, cartridge: @cartridge, state:, stream: @stream)
+ @session = Session.new(
+ provider:, cartridge: @cartridge, state:, stream: @stream, environment:
+ )
end
def cartridge