Skip to content

Commit

Permalink
Change Session.Server name for backward compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Brutus5000 committed Oct 28, 2023
1 parent c85541b commit 7bcd52b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions src/main/kotlin/com/faforever/icebreaker/service/Session.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ data class Session(
val servers: List<Server>,
) {
data class Server(
val userName: String,
val secret: String,
val iceServerUrls: List<String>,
val username: String,
val credential: String,
val urls: List<String>,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class CoturnSessionHandler(
.map {
val (tokenName, tokenSecret) = buildHmac(sessionId, it.presharedKey)
Session.Server(
userName = tokenName,
secret = tokenSecret,
iceServerUrls = buildUrls(hostName = it.host, port = it.port),
username = tokenName,
credential = tokenSecret,
urls = buildUrls(hostName = it.host, port = it.port),
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ class XirsysSessionHandler(
is XirsysResponse.Success -> result.data.iceServers.let {
listOf(
Session.Server(
userName = it.username,
secret = it.credential,
iceServerUrls = it.urls,
username = it.username,
credential = it.credential,
urls = it.urls,
),
)
}
Expand Down

0 comments on commit 7bcd52b

Please sign in to comment.