Skip to content

Commit

Permalink
fixup bot_manager
Browse files Browse the repository at this point in the history
  • Loading branch information
AminArria committed Jun 12, 2024
1 parent 5fb98ef commit 205dde1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/bot_manager/lib/game_socket_handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ defmodule BotManager.GameSocketHandler do
"arena_host" => arena_host
}) do
Logger.info("Connecting bot with client: #{bot_client} to game: #{game_id} in the server: #{arena_host}")

%{token: token, secret: secret} = BotManager.TokenFetcher.get_auth()
if arena_host == "localhost" do
"ws://localhost:4000/play/#{game_id}/#{bot_client}"
"ws://localhost:4000/play/#{game_id}/#{bot_client}?bot_token=#{token}&bot_secret=#{secret}"
else
"wss://#{arena_host}/play/#{game_id}/#{bot_client}"
"wss://#{arena_host}/play/#{game_id}/#{bot_client}?bot_token=#{token}&bot_secret=#{secret}"
end
end
end

0 comments on commit 205dde1

Please sign in to comment.