Skip to content

Commit 749784a

Browse files
committed
Add active rating groups to matchmaker info message
1 parent 89b26cc commit 749784a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

faf-commons-lobby/src/main/kotlin/com/faforever/commons/lobby/MatchmakerApi.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ data class MatchmakerInfo(
7676
val teamSize: Int,
7777
@JsonProperty("num_players")
7878
val numberOfPlayers: Int,
79+
@JsonProperty("active_rating_groups")
80+
val activeRatingGroups: List<Int>,
7981
@JsonProperty("boundary_75s")
8082
val boundary75s: List<List<Int>>,
8183
@JsonProperty("boundary_80s")

faf-commons-lobby/src/test/kotlin/com/faforever/commons/lobby/ServerMessageTest.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,19 @@ class ServerMessageTest {
7272
fun deserializeMatchmakerInfo() {
7373
val result = objectMapper.readValue<ServerMessage>(
7474
"""
75-
{"command":"matchmaker_info","queues":[{"queue_name":"ladder1v1","queue_pop_time":"2021-03-21T22:26:27.555251+00:00","queue_pop_time_delta":10, "num_players":1,"boundary_80s":[[670,1070]],"boundary_75s":[[770,970]],"team_size":1}]}
75+
{"command":"matchmaker_info","queues":[{"queue_name":"ladder1v1","queue_pop_time":"2021-03-21T22:26:27.555251+00:00","queue_pop_time_delta":10, "num_players":1,"active_rating_groups":[875],"boundary_80s":[[670,1070]],"boundary_75s":[[770,970]]"team_size":1}]}
7676
""".trimIndent()
7777
)
7878
assertEquals(
7979
MatchmakerInfo(
8080
listOf(
8181
MatchmakerInfo.MatchmakerQueue(
82-
"ladder1v1", OffsetDateTime.parse("2021-03-21T22:26:27.555251+00:00"),
82+
"ladder1v1",
83+
OffsetDateTime.parse("2021-03-21T22:26:27.555251+00:00"),
8384
10f,
8485
1,
8586
1,
87+
listOf(875),
8688
listOf(listOf(770, 970)),
8789
listOf(listOf(670, 1070))
8890
)

0 commit comments

Comments
 (0)