Class: ChatSDK::Events::DirectMessage

Inherits:
Base
  • Object
show all
Defined in:
lib/chat_sdk/events/direct_message.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#adapter_name, #platform, #raw, #timestamp, #type

Instance Method Summary collapse

Constructor Details

#initialize(message:, thread_id:, channel_id:, **kwargs) ⇒ DirectMessage

Returns a new instance of DirectMessage.



8
9
10
11
12
13
# File 'lib/chat_sdk/events/direct_message.rb', line 8

def initialize(message:, thread_id:, channel_id:, **kwargs)
  super(type: :direct_message, **kwargs)
  @message = message
  @thread_id = thread_id
  @channel_id = channel_id
end

Instance Attribute Details

#channel_idObject (readonly)

Returns the value of attribute channel_id.



6
7
8
# File 'lib/chat_sdk/events/direct_message.rb', line 6

def channel_id
  @channel_id
end

#messageObject (readonly)

Returns the value of attribute message.



6
7
8
# File 'lib/chat_sdk/events/direct_message.rb', line 6

def message
  @message
end

#thread_idObject (readonly)

Returns the value of attribute thread_id.



6
7
8
# File 'lib/chat_sdk/events/direct_message.rb', line 6

def thread_id
  @thread_id
end