Class: FlowChat::Config::MessengerConfig

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMessengerConfig

Returns a new instance of MessengerConfig.



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/flow_chat/config.rb', line 156

def initialize
  @api_base_url = "https://graph.facebook.com/v23.0"
  # Meta does not state a text limit for Messenger on any current reference
  # page, unlike Instagram's documented 1,000 bytes. 2000 is the long-cited
  # figure and is safe to be wrong about in this direction: the client
  # splits text at this value rather than truncating it, so a limit set too
  # low sends an extra message and one set too high gets rejected. Raise it
  # only against a documented figure.
  @max_text_length = 2000
  @max_quick_replies = 13
  @max_quick_reply_title = 20
  @max_carousel_elements = 10
  @max_buttons_per_element = 3
  @max_button_title = 20
  @max_element_title = 80
end

Instance Attribute Details

#api_base_urlObject

Writable for the same reason as WhatsappConfig's, above.



151
152
153
# File 'lib/flow_chat/config.rb', line 151

def api_base_url
  @api_base_url
end

#max_button_titleObject (readonly)

Returns the value of attribute max_button_title.



152
153
154
# File 'lib/flow_chat/config.rb', line 152

def max_button_title
  @max_button_title
end

#max_buttons_per_elementObject (readonly)

Returns the value of attribute max_buttons_per_element.



152
153
154
# File 'lib/flow_chat/config.rb', line 152

def max_buttons_per_element
  @max_buttons_per_element
end

Returns the value of attribute max_carousel_elements.



152
153
154
# File 'lib/flow_chat/config.rb', line 152

def max_carousel_elements
  @max_carousel_elements
end

#max_element_titleObject (readonly)

Returns the value of attribute max_element_title.



152
153
154
# File 'lib/flow_chat/config.rb', line 152

def max_element_title
  @max_element_title
end

#max_quick_repliesObject (readonly)

Returns the value of attribute max_quick_replies.



152
153
154
# File 'lib/flow_chat/config.rb', line 152

def max_quick_replies
  @max_quick_replies
end

#max_quick_reply_titleObject (readonly)

Returns the value of attribute max_quick_reply_title.



152
153
154
# File 'lib/flow_chat/config.rb', line 152

def max_quick_reply_title
  @max_quick_reply_title
end

#max_text_lengthObject (readonly)

Returns the value of attribute max_text_length.



152
153
154
# File 'lib/flow_chat/config.rb', line 152

def max_text_length
  @max_text_length
end