added room id in exchange parameters

This commit is contained in:
Beatrice Olivera
2018-08-30 18:42:42 +01:00
parent 5245f2257d
commit c3b072ba38
6 changed files with 77 additions and 15 deletions

View File

@@ -5,6 +5,20 @@ class ChatRoomsController < ApplicationController
end
def create
# HTTP status code 200 with an empty body
head :no_content
puts ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>11123213213213123213"
puts params
puts ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>11123213213213123213"
ActionCable.server.broadcast "chat_room_#{params[:room]}", session_params
end
private
def session_params
# SDP = Session description protocol (codec info from client)
# Candidate = ICE candidates (e.g. TURN and STUN server)
params.permit(:type, :from, :to, :sdp, :candidate, :room)
end
end