Sha256: b9a63650bb3bebf31cfed625d225b5b25ad68e3011ae3ff4fb44da9a039313ab

Contents?: true

Size: 679 Bytes

Versions: 1

Compression:

Stored size: 679 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
        permalink = @client.chat_getPermalink(channel: @original[:channel]["id"], message_ts: @original[:ts])
        permalink['permalink']
      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

1 entries across 1 versions & 1 rubygems

Version Path
ruboty-slack_reaction_added-0.2.0 lib/ruboty/slack_reaction_added/extension/message.rb