Sha256: d4d4dbb386f5ffa5d45356cd6d2d64e21a5e3ad9c42c2c008dc2aa8359601e46

Contents?: true

Size: 555 Bytes

Versions: 1

Compression:

Stored size: 555 Bytes

Contents

module Slack
  module RealTime
    module EventHandlers
      module ChannelRename
        # A team channel was renamed.
        # @see https://api.slack.com/events/channel_rename
        # @see https://github.com/dblock/slack-api-ref/blob/master/events/channel_rename.json
        def self.call(client, data)
          channel = client.channels[data.channel.id]
          channel.name = data.channel.name if channel
        end
      end
    end
  end
end

Slack::RealTime::Client.events['channel_rename'] = Slack::RealTime::EventHandlers::ChannelRename

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_rename.rb