Sha256: cef49c732dd8e95a1c0b45b8133c9a2db277d0f23e53816f26582dd3e18d5469

Contents?: true

Size: 605 Bytes

Versions: 4

Compression:

Stored size: 605 Bytes

Contents

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

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

      def reaction
        @original[:reaction]
      end

      def reaction_by
        @original[:reaction_by]
      end

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

    prepend ReactionAddedMessage
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruboty-slack_reaction_added-0.6.0 lib/ruboty/slack_reaction_added/extension/message.rb
ruboty-slack_reaction_added-0.5.0 lib/ruboty/slack_reaction_added/extension/message.rb
ruboty-slack_reaction_added-0.4.0 lib/ruboty/slack_reaction_added/extension/message.rb
ruboty-slack_reaction_added-0.3.0 lib/ruboty/slack_reaction_added/extension/message.rb