Sha256: f12d5e8b8e4a4d7a9f23c0be84ab653dc958c461261aaa1d1ef2487d44262ace

Contents?: true

Size: 561 Bytes

Versions: 1

Compression:

Stored size: 561 Bytes

Contents

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

Slack::RealTime::Client.events['group_left'] = Slack::RealTime::EventHandlers::GroupLeft

Version data entries

1 entries across 1 versions & 1 rubygems

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