Module: Ruboty::Actions::Ragoon

Included in:
Event, Notification, Remind
Defined in:
lib/ruboty/actions/ragoon.rb,
lib/ruboty/actions/ragoon/event.rb,
lib/ruboty/actions/ragoon/remind.rb,
lib/ruboty/actions/ragoon/notification.rb

Defined Under Namespace

Classes: Event, Notification, Remind

Instance Method Summary collapse

Instance Method Details

#private?Boolean

Returns:

  • (Boolean)


4
5
6
7
8
9
10
# File 'lib/ruboty/actions/ragoon.rb', line 4

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