Class: FlowChat::Config::SessionConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_chat/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSessionConfig

Returns a new instance of SessionConfig.



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/flow_chat/config.rb', line 29

def initialize
  # Session boundaries control how session IDs are constructed
  # :flow = separate sessions per flow
  # :gateway = separate sessions per gateway
  # :platform = separate sessions per platform (ussd, whatsapp)
  @boundaries = [:flow, :gateway, :platform]
  
  # Always hash phone numbers for privacy
  @hash_phone_numbers = true
  
  # Session identifier type (nil = let platforms choose their default)
  # :msisdn = durable sessions (durable across timeouts)
  # :request_id = ephemeral sessions (new session each time)
  @identifier = nil
end

Instance Attribute Details

#boundariesObject

Returns the value of attribute boundaries.



27
28
29
# File 'lib/flow_chat/config.rb', line 27

def boundaries
  @boundaries
end

#hash_phone_numbersObject

Returns the value of attribute hash_phone_numbers.



27
28
29
# File 'lib/flow_chat/config.rb', line 27

def hash_phone_numbers
  @hash_phone_numbers
end

#identifierObject

Returns the value of attribute identifier.



27
28
29
# File 'lib/flow_chat/config.rb', line 27

def identifier
  @identifier
end