Class: Hipbot::Callbacks::LobbyPresence
- Defined in:
- lib/hipbot/callbacks/lobby_presence.rb
Instance Attribute Summary
Attributes inherited from Presence
Instance Method Summary collapse
-
#initialize(user_id, presence) ⇒ LobbyPresence
constructor
A new instance of LobbyPresence.
Constructor Details
#initialize(user_id, presence) ⇒ LobbyPresence
Returns a new instance of LobbyPresence.
4 5 6 7 8 9 10 11 |
# File 'lib/hipbot/callbacks/lobby_presence.rb', line 4 def initialize user_id, presence self.presence = presence with_user(id: user_id) do |user| Hipbot.logger.info("PRESENCE from #{user}: #{presence}") user.update_attribute(:is_online, !offline_presence?) end end |