Class: ChatSDK::Events::Reaction
- Defined in:
- lib/chat_sdk/events/reaction.rb
Instance Attribute Summary collapse
-
#added ⇒ Object
readonly
Returns the value of attribute added.
-
#channel_id ⇒ Object
readonly
Returns the value of attribute channel_id.
-
#emoji ⇒ Object
readonly
Returns the value of attribute emoji.
-
#message_id ⇒ Object
readonly
Returns the value of attribute message_id.
-
#thread ⇒ Object
Returns the value of attribute thread.
-
#thread_id ⇒ Object
readonly
Returns the value of attribute thread_id.
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Attributes inherited from Base
#adapter_name, #platform, #raw, #timestamp, #type
Instance Method Summary collapse
- #added? ⇒ Boolean
-
#initialize(emoji:, user_id:, message_id:, thread_id:, channel_id:, added: true, **kwargs) ⇒ Reaction
constructor
A new instance of Reaction.
- #removed? ⇒ Boolean
Constructor Details
#initialize(emoji:, user_id:, message_id:, thread_id:, channel_id:, added: true, **kwargs) ⇒ Reaction
Returns a new instance of Reaction.
9 10 11 12 13 14 15 16 17 |
# File 'lib/chat_sdk/events/reaction.rb', line 9 def initialize(emoji:, user_id:, message_id:, thread_id:, channel_id:, added: true, **kwargs) super(type: :reaction, **kwargs) @emoji = emoji @user_id = user_id @message_id = @thread_id = thread_id @channel_id = channel_id @added = added end |
Instance Attribute Details
#added ⇒ Object (readonly)
Returns the value of attribute added.
6 7 8 |
# File 'lib/chat_sdk/events/reaction.rb', line 6 def added @added end |
#channel_id ⇒ Object (readonly)
Returns the value of attribute channel_id.
6 7 8 |
# File 'lib/chat_sdk/events/reaction.rb', line 6 def channel_id @channel_id end |
#emoji ⇒ Object (readonly)
Returns the value of attribute emoji.
6 7 8 |
# File 'lib/chat_sdk/events/reaction.rb', line 6 def emoji @emoji end |
#message_id ⇒ Object (readonly)
Returns the value of attribute message_id.
6 7 8 |
# File 'lib/chat_sdk/events/reaction.rb', line 6 def @message_id end |
#thread ⇒ Object
Returns the value of attribute thread.
7 8 9 |
# File 'lib/chat_sdk/events/reaction.rb', line 7 def thread @thread end |
#thread_id ⇒ Object (readonly)
Returns the value of attribute thread_id.
6 7 8 |
# File 'lib/chat_sdk/events/reaction.rb', line 6 def thread_id @thread_id end |
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
6 7 8 |
# File 'lib/chat_sdk/events/reaction.rb', line 6 def user_id @user_id end |
Instance Method Details
#added? ⇒ Boolean
19 20 21 |
# File 'lib/chat_sdk/events/reaction.rb', line 19 def added? @added end |
#removed? ⇒ Boolean
23 24 25 |
# File 'lib/chat_sdk/events/reaction.rb', line 23 def removed? !@added end |