Skip to content

Commit

Permalink
Fix rubocop issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianAppDev committed Jun 17, 2024
1 parent e8d4d4f commit 9600e2d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
3 changes: 2 additions & 1 deletion app/services/meeting_starter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ def initialize(room:, base_url:, current_user:, provider:)

def call
# TODO: amir - Check the legitimately of the action.
options = RoomSettingsGetter.new(room_id: @room.id, provider: @room.user.provider, current_user: @current_user, only_bbb_options: true, voice_bridge: @room.voice_bridge).call
options = RoomSettingsGetter.new(room_id: @room.id, provider: @room.user.provider, current_user: @current_user, only_bbb_options: true,
voice_bridge: @room.voice_bridge).call
viewer_code = RoomSettingsGetter.new(
room_id: @room.id,
provider: @room.user.provider,
Expand Down
6 changes: 3 additions & 3 deletions app/services/room_settings_getter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ def infer_can_record(room_settings:)
end

def set_voice_brige(room_settings:)
if @voice_bridge != nil
room_settings['voiceBridge'] = "#{@voice_bridge}"
end
return if @voice_bridge.nil?

room_settings['voiceBridge'] = @voice_bridge.to_s
end
end
2 changes: 1 addition & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class Application < Rails::Application

config.voice_bridge_phone_number = ENV.fetch('VOICE_BRIDGE_PHONE_NUMBER', nil)
config.sip_pin_length = ENV.fetch('SIP_PIN_LENGTH', 5)

config.i18n.fallbacks = %i[en]
config.i18n.enforce_available_locales = false
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ def up
end

def down
# rubocop:disable Rails/SkipsModelValidations
Room.update_all(voice_bridge: nil)
# rubocop:enable Rails/SkipsModelValidations
end
end
4 changes: 3 additions & 1 deletion db/migrate/20230321125010_add_voice_brige_to_romms.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true

class AddVoiceBrigeToRomms < ActiveRecord::Migration[7.0]
def change
add_column :rooms, :voice_bridge, :integer, null: true, default: nil
add_index :rooms, :voice_bridge
add_index :rooms, :voice_bridge, unique: true
end
end
8 changes: 4 additions & 4 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9600e2d

Please sign in to comment.