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.



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/flow_chat/config.rb', line 34

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_identifiers = 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.



32
33
34
# File 'lib/flow_chat/config.rb', line 32

def boundaries
  @boundaries
end

#hash_identifiersObject

Returns the value of attribute hash_identifiers.



32
33
34
# File 'lib/flow_chat/config.rb', line 32

def hash_identifiers
  @hash_identifiers
end

#identifierObject

Returns the value of attribute identifier.



32
33
34
# File 'lib/flow_chat/config.rb', line 32

def identifier
  @identifier
end