Sha256: 6f21bf52b2ba27f7527b7546cfa6494d5f176a12e4aa1f35ceca7416bbbc677c

Contents?: true

Size: 548 Bytes

Versions: 1

Compression:

Stored size: 548 Bytes

Contents

module Slack
  module RealTime
    module EventHandlers
      module PresenceChange
        # A team member's presence changed.
        # @see https://api.slack.com/events/presence_change
        # @see https://github.com/dblock/slack-api-ref/blob/master/events/presence_change.json
        def self.call(client, data)
          user = client.users[data.user]
          user.presence = data.presence if user
        end
      end
    end
  end
end

Slack::RealTime::Client.events['presence_change'] = Slack::RealTime::EventHandlers::PresenceChange

Version data entries

1 entries across 1 versions & 1 rubygems

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