Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
324 changes: 89 additions & 235 deletions GenOnlineService/Constants.cs

Large diffs are not rendered by default.

13 changes: 3 additions & 10 deletions GenOnlineService/Controllers/Lobbies/LobbiesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,6 @@ public async Task<APIResult> Put()

if (playerSession != null)
{
// cleanup any zombie lobbies
await _lobbyManager.CleanupUserLobbiesNotStarted(user_id);

await using var db = await _dbFactory.CreateDbContextAsync();
string strDisplayName = await Database.Users.GetDisplayName(db, user_id);
Expand All @@ -342,14 +340,9 @@ public async Task<APIResult> Put()
result.result = 1;
result.lobby_id = newLobbyID;

// TODO: What if this fails? just let them proceed? just means only direct connect people will be able to play
// get some turn credentials
TURNCredentialContainer? turnCredentials = await TURNCredentialManager.CreateCredentialsForUser(user_id);
if (turnCredentials != null)
{
result.turn_username = turnCredentials.m_strUsername;
result.turn_token = turnCredentials.m_strToken;
}
var credentials = await _lobbyManager.CreateLobbyRelayCredentialsAsync(playerSession, newLobbyID);
result.turn_username = credentials.Username;
result.turn_token = credentials.Token;
}
else
{
Expand Down
Loading
Loading