Module: Slack::RealTime::EventHandlers::ChannelJoined

Defined in:
lib/slack/real_time/event_handlers/channel_joined.rb

Class Method Summary collapse

Class Method Details

.call(client, data) ⇒ Object

You joined a channel.


8
9
10
11
12
13
14
15
16
# File 'lib/slack/real_time/event_handlers/channel_joined.rb', line 8

def self.call(client, data)
  channel_id = data.channel.id
  channel = client.channels[channel_id]
  if channel
    channel.merge!(data.channel)
  else
    client.channels[channel_id] = Models::Channel.new(data.channel)
  end
end