Synchronize resetCode for pair programming
This commit is contained in:

committed by
Sebastian Serth

parent
cc90861bd5
commit
f37ba34389
@ -46,6 +46,11 @@ class SynchronizedEditorChannel < ApplicationCable::Channel
|
||||
ActionCable.server.broadcast(specific_channel, message)
|
||||
end
|
||||
|
||||
def reset_content(content)
|
||||
message = create_reset_content_message(content)
|
||||
ActionCable.server.broadcast(specific_channel, message)
|
||||
end
|
||||
|
||||
def create_message(action, status)
|
||||
{
|
||||
action:,
|
||||
@ -54,4 +59,13 @@ class SynchronizedEditorChannel < ApplicationCable::Channel
|
||||
session_id: @session_id,
|
||||
}
|
||||
end
|
||||
|
||||
def create_reset_content_message(content)
|
||||
{
|
||||
action: content['action'],
|
||||
files: content['files'],
|
||||
user: current_user.to_page_context,
|
||||
session_id: @session_id,
|
||||
}
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user