Module: Ruboty::Message::ReactionAddedMessage

Included in:
Ruboty::Message
Defined in:
lib/ruboty/slack_reaction_added/extension/message.rb

Instance Method Summary collapse

Instance Method Details

#add_reaction(reaction) ⇒ Object



5
6
7
8
9
# File 'lib/ruboty/slack_reaction_added/extension/message.rb', line 5

def add_reaction(reaction)
  channel_id = @original[:channel]["id"]
  timestamp  = @original[:ts]
  robot.add_reaction(reaction, channel_id, timestamp)
end

#dump_original(key) ⇒ Object



23
24
25
# File 'lib/ruboty/slack_reaction_added/extension/message.rb', line 23

def dump_original(key)
  Ruboty.logger.info @original[key]
end


11
12
13
# File 'lib/ruboty/slack_reaction_added/extension/message.rb', line 11

def permalink
  robot.permalink(@original[:channel]["id"], @original[:ts])
end

#reactionObject



15
16
17
# File 'lib/ruboty/slack_reaction_added/extension/message.rb', line 15

def reaction
  @original[:reaction]
end

#reaction_byObject



19
20
21
# File 'lib/ruboty/slack_reaction_added/extension/message.rb', line 19

def reaction_by
  @original[:reaction_by]
end