forked from External/greenlight
allow client to be determined by server
This commit is contained in:
parent
3748bb2140
commit
f0ab2924db
|
@ -74,7 +74,6 @@ class Room < ApplicationRecord
|
||||||
# Generate the join URL.
|
# Generate the join URL.
|
||||||
join_opts = {}
|
join_opts = {}
|
||||||
join_opts[:userID] = uid if uid
|
join_opts[:userID] = uid if uid
|
||||||
join_opts[:joinViaHtml5] = true if Rails.configuration.html5_enabled
|
|
||||||
|
|
||||||
bbb.join_meeting_url(bbb_id, name, password, join_opts)
|
bbb.join_meeting_url(bbb_id, name, password, join_opts)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
# Send a request to check if the HTML5 client is enabled on the BigBlueButton server.
|
|
||||||
uri = URI.parse(Rails.configuration.bigbluebutton_endpoint.gsub('bigbluebutton/api', 'html5client/check'))
|
|
||||||
res = Net::HTTP.get_response(uri)
|
|
||||||
|
|
||||||
# Set the HTML5 status.
|
|
||||||
Rails.application.config.html5_enabled = (res.code.to_i == 200)
|
|
|
@ -78,11 +78,10 @@ describe Room, type: :model do
|
||||||
endpoint = Rails.configuration.bigbluebutton_endpoint
|
endpoint = Rails.configuration.bigbluebutton_endpoint
|
||||||
secret = Rails.configuration.bigbluebutton_secret
|
secret = Rails.configuration.bigbluebutton_secret
|
||||||
fullname = "fullName=Example"
|
fullname = "fullName=Example"
|
||||||
html = Rails.configuration.html5_enabled ? "&joinViaHtml5=true" : ""
|
|
||||||
meeting_id = "&meetingID=#{@room.bbb_id}"
|
meeting_id = "&meetingID=#{@room.bbb_id}"
|
||||||
password = "&password=testpass"
|
password = "&password=testpass"
|
||||||
|
|
||||||
query = fullname + html + meeting_id + password
|
query = fullname + meeting_id + password
|
||||||
checksum_string = "join#{query + secret}"
|
checksum_string = "join#{query + secret}"
|
||||||
|
|
||||||
checksum = OpenSSL::Digest.digest('sha1', checksum_string).unpack("H*").first
|
checksum = OpenSSL::Digest.digest('sha1', checksum_string).unpack("H*").first
|
||||||
|
|
Loading…
Reference in New Issue