Class: SelfSDK::Messages::ChatMessage
- Defined in:
- lib/messages/chat_message.rb
Constant Summary collapse
- MSG_TYPE =
"chat.message"
- DEFAULT_EXP_TIMEOUT =
900
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
Attributes inherited from Base
#description, #exp_timeout, #expires, #fields, #from, #from_device, #id, #input, #intermediary, #payload, #status, #sub, #to, #to_device, #typ
Instance Method Summary collapse
Methods inherited from Base
#accepted?, #encrypt_message, #errored?, #initialize, #rejected?, #request, #send_message, #unauthorized?, #validate!
Constructor Details
This class inherits a constructor from SelfSDK::Messages::Base
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
13 14 15 |
# File 'lib/messages/chat_message.rb', line 13 def body @body end |
Instance Method Details
#parse(input, envelope = nil) ⇒ Object
15 16 17 18 19 |
# File 'lib/messages/chat_message.rb', line 15 def parse(input, envelope=nil) super @typ = MSG_TYPE @body = @payload[:msg] end |