Sha256: d76df7d0e255349dbeaa8d42770f71beac91739b48a6bc6d6e81641a256c9e50

Contents?: true

Size: 369 Bytes

Versions: 1

Compression:

Stored size: 369 Bytes

Contents

module Ruboty
  module Actions
    module Helpers
      def private?
        adapter = message.original[:robot].send(:adapter)
        return false unless adapter.private_methods.include?(:user_info)

        owner = adapter.send(:user_info, ENV['SLACK_OWNER_ID'])
        message.from.start_with?('D') && owner['name'] == message.from_name
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruboty-ragoon-0.3.1 lib/ruboty/actions/helpers.rb