forked from External/greenlight
GRN2-ZZZ: Added messages for debugging actioncable (#731)
* GRN2-ZZZ: Added messages for debugging actioncable * GRN2-ZZZ: Added data to the js message for debugging actioncable * GRN2-ZZZ: Added data to the js message for debugging actioncable * Log unsubscribe
This commit is contained in:
parent
921f252223
commit
4d69d06ba1
|
@ -22,9 +22,24 @@ $(document).on("turbolinks:load", function(){
|
|||
if(controller == "rooms" && action == "join"){
|
||||
App.waiting = App.cable.subscriptions.create({
|
||||
channel: "WaitingChannel",
|
||||
uid: $(".background").attr("room")
|
||||
roomuid: $(".background").attr("room"),
|
||||
useruid: $(".background").attr("user")
|
||||
}, {
|
||||
connected: function() {
|
||||
console.log("connected");
|
||||
},
|
||||
|
||||
disconnected: function(data) {
|
||||
console.log("disconnected");
|
||||
console.log(data);
|
||||
},
|
||||
|
||||
rejected: function() {
|
||||
console.log("rejected");
|
||||
},
|
||||
|
||||
received: function(data){
|
||||
console.log(data);
|
||||
if(data.action = "started"){
|
||||
request_to_join_meeting();
|
||||
}
|
||||
|
|
|
@ -18,6 +18,11 @@
|
|||
|
||||
class WaitingChannel < ApplicationCable::Channel
|
||||
def subscribed
|
||||
stream_from "#{params[:uid]}_waiting_channel"
|
||||
Rails.logger.info "subscribed [#{params[:useruid]}:#{params[:roomuid]}]"
|
||||
stream_from "#{params[:roomuid]}_waiting_channel"
|
||||
end
|
||||
|
||||
def unsubscribed
|
||||
Rails.logger.info "unsubscribed [#{params[:useruid]}:#{params[:roomuid]}]"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
%>
|
||||
|
||||
<div class="background pb-9" room="<%= @room.uid %>" join-name="<%= @join_name %>">
|
||||
<div class="background pb-9" room="<%= @room.uid %>" user="<%= current_user ? current_user.uid : "anonymous" %>" join-name="<%= @join_name %>">
|
||||
<div class="container">
|
||||
<div class="row pt-9">
|
||||
<div class="col-lg-12 col-sm-12">
|
||||
|
|
|
@ -138,5 +138,11 @@ module Greenlight
|
|||
|
||||
# Default admin password
|
||||
config.admin_password_default = ENV['ADMIN_PASSWORD'] || 'administrator'
|
||||
|
||||
config.action_cable.log_tags = [
|
||||
->(request) { request.session['user_id'] || "no-account" },
|
||||
:action_cable,
|
||||
->(request) { request.uuid }
|
||||
]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue