Sha256: 112d8ddf4b00a01094330960f1c7f182193f41d7ee9545df51650b7e90c76a10

Contents?: true

Size: 556 Bytes

Versions: 1

Compression:

Stored size: 556 Bytes

Contents

module Slack
  module RealTime
    module EventHandlers
      module ChannelLeft
        # You left a channel.
        # @see https://api.slack.com/events/channel_left
        # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_left.json
        def self.call(client, data)
          channel = client.channels[data.channel]
          channel.members.delete(client.self.id) if channel.key?('members')
        end
      end
    end
  end
end

Slack::RealTime::Client.events['channel_left'] = Slack::RealTime::EventHandlers::ChannelLeft

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slack-ruby-client-0.6.0 lib/slack/real_time/event_handlers/channel_left.rb