2019-10-24 20:07:01 +00:00
|
|
|
class RoomChannel < ApplicationCable::Channel
|
|
|
|
def subscribed
|
|
|
|
stream_from params[:pubsub_token]
|
2020-02-02 17:04:16 +00:00
|
|
|
::OnlineStatusTracker.add_subscription(params[:pubsub_token])
|
|
|
|
end
|
|
|
|
|
|
|
|
def unsubscribed
|
|
|
|
::OnlineStatusTracker.remove_subscription(params[:pubsub_token])
|
2019-10-24 20:07:01 +00:00
|
|
|
end
|
|
|
|
end
|