Class: Lita::Adapters::Slack::RoomCreator

Inherits:
Object
  • Object
show all
Defined in:
lib/lita/adapters/slack/room_creator.rb

Class Method Summary collapse

Class Method Details

.create_room(channel, robot) ⇒ Object



6
7
8
9
10
# File 'lib/lita/adapters/slack/room_creator.rb', line 6

def create_room(channel, robot)
  Lita::Room.create_or_update(channel.id, name: channel.name)

  robot.trigger(:slack_channel_created, slack_channel: channel)
end

.create_rooms(channels, robot) ⇒ Object



12
13
14
# File 'lib/lita/adapters/slack/room_creator.rb', line 12

def create_rooms(channels, robot)
  channels.each { |channel| create_room(channel, robot) }
end