Add events for current_content and connection_status
This commit is contained in:

committed by
Sebastian Serth

parent
5ae306997b
commit
49e3fa6176
@ -43,10 +43,14 @@ class SynchronizedEditorChannel < ApplicationCable::Channel
|
||||
end
|
||||
|
||||
def connection_status
|
||||
ActionCable.server.broadcast(specific_channel, create_message('connection_status', 'connected'))
|
||||
message = create_message('connection_status', 'connected')
|
||||
|
||||
Event::SynchronizedEditor.create_for_connection_change(message, current_user, programming_group)
|
||||
ActionCable.server.broadcast(specific_channel, message)
|
||||
end
|
||||
|
||||
def current_content(message)
|
||||
Event::SynchronizedEditor.create_for_current_content(message, current_user, programming_group)
|
||||
ActionCable.server.broadcast(specific_channel, message)
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user