Sha256: a378fa78fd38fa9b62fd139b5140998d60a3e8f2bc1d44c9cd11322f9a1ec116

Contents?: true

Size: 617 Bytes

Versions: 3

Compression:

Stored size: 617 Bytes

Contents

class SlackSmartBot
    #todo: add pagination for case more than 1000 members in the channel
    def get_channel_members(channel_id)
        begin
            if channel_id.nil?
                return nil
            else
                if config.simulate and config.key?(:client)
                    client.web_client.conversations_members[channel_id.to_sym].members
                else
                    client.web_client.conversations_members(channel: channel_id, limit: 1000).members
                end
            end
        rescue Exception => stack
            @logger.warn stack
        end

    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
slack-smart-bot-1.14.2 lib/slack/smart-bot/comm/get_channel_members.rb
slack-smart-bot-1.14.1 lib/slack/smart-bot/comm/get_channel_members.rb
slack-smart-bot-1.14.0 lib/slack/smart-bot/comm/get_channel_members.rb