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.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/flow_chat/config.rb', line 77

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

  # Proc for custom session ID generation (overrides default behavior when set)
  @session_id_proc = nil
end

Instance Attribute Details

#boundariesObject

Returns the value of attribute boundaries.



75
76
77
# File 'lib/flow_chat/config.rb', line 75

def boundaries
  @boundaries
end

#hash_identifiersObject

Returns the value of attribute hash_identifiers.



75
76
77
# File 'lib/flow_chat/config.rb', line 75

def hash_identifiers
  @hash_identifiers
end

#identifierObject

Returns the value of attribute identifier.



75
76
77
# File 'lib/flow_chat/config.rb', line 75

def identifier
  @identifier
end

#session_id_procObject

Returns the value of attribute session_id_proc.



75
76
77
# File 'lib/flow_chat/config.rb', line 75

def session_id_proc
  @session_id_proc
end