forked from External/greenlight
		
	room updates in job
This commit is contained in:
		@@ -47,9 +47,15 @@ class @Meeting
 | 
				
			|||||||
  getId: ->
 | 
					  getId: ->
 | 
				
			||||||
    return @id
 | 
					    return @id
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  setId: (id) ->
 | 
				
			||||||
 | 
					    @id = id
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  getURL: ->
 | 
					  getURL: ->
 | 
				
			||||||
    return @url
 | 
					    return @url
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  setURL: (url) ->
 | 
				
			||||||
 | 
					    @url = url
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  getName: ->
 | 
					  getName: ->
 | 
				
			||||||
    return @name
 | 
					    return @name
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,9 +29,7 @@ class BbbController < ApplicationController
 | 
				
			|||||||
      )
 | 
					      )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if bbb_res[:returncode] && current_user && current_user == user
 | 
					      if bbb_res[:returncode] && current_user && current_user == user
 | 
				
			||||||
        ActionCable.server.broadcast "#{user.encrypted_id}_meeting_updates_channel",
 | 
					        JoinMeetingJob.perform_later(user.encrypted_id)
 | 
				
			||||||
          action: 'moderator_joined',
 | 
					 | 
				
			||||||
          moderator: 'joined'
 | 
					 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      render_bbb_response bbb_res, bbb_res[:response]
 | 
					      render_bbb_response bbb_res, bbb_res[:response]
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										9
									
								
								app/jobs/join_meeting_job.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/jobs/join_meeting_job.rb
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
				
			|||||||
 | 
					class JoinMeetingJob < ApplicationJob
 | 
				
			||||||
 | 
					  queue_as :default
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  def perform(room)
 | 
				
			||||||
 | 
					    ActionCable.server.broadcast "#{room}_meeting_updates_channel",
 | 
				
			||||||
 | 
					      action: 'moderator_joined',
 | 
				
			||||||
 | 
					      moderator: 'joined'
 | 
				
			||||||
 | 
					  end
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
		Reference in New Issue
	
	Block a user