Class: Chat::StatusChannel

Inherits:
ApplicationCable::Channel
  • Object
show all
Defined in:
app/channels/chat/status_channel.rb

Instance Method Summary collapse

Instance Method Details

#onlineObject



4
5
6
7
8
# File 'app/channels/chat/status_channel.rb', line 4

def online
  stop_all_streams
  stream_from "chat::status"
  current_user.online
end

#unsubscribedObject



10
11
12
13
# File 'app/channels/chat/status_channel.rb', line 10

def unsubscribed
  current_user.offline
  stop_all_streams
end