From cb8a84a60773cfe9e7fab03d93fc6430e4574351 Mon Sep 17 00:00:00 2001 From: icebaker Date: Sat, 3 Jun 2023 19:13:26 -0300 Subject: add cryptography to state and user identifiers --- controllers/instance.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'controllers/instance.rb') 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 -- cgit v1.2.3