0b31e14132
* Feature: Add online status to each user * Add OnlineStatusable, add availability status to thumbnail
11 lines
219 B
Ruby
11 lines
219 B
Ruby
module AvailabilityStatusable
|
|
extend ActiveSupport::Concern
|
|
|
|
def online?
|
|
::OnlineStatusTracker.subscription_count(pubsub_token) != 0
|
|
end
|
|
|
|
def availability_status
|
|
online? ? 'online' : 'offline'
|
|
end
|
|
end
|