Skip to content

Commit 6f830c5

Browse files
committed
Fix newconferencegroup api only adding the last user
1 parent 32f27ee commit 6f830c5

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

library/src/main/kotlin/me/proxer/library/api/messenger/InternalApi.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ internal interface InternalApi {
4444
fun createConferenceGroup(
4545
@Field("topic") topic: String?,
4646
@Field("text") firstMessage: String?,
47-
@Field("users") participants: List<String>?
47+
@Field("users[]") participants: List<String>?
4848
): ProxerCall<String>
4949

5050
@FormUrlEncoded

library/src/test/kotlin/me/proxer/library/api/messenger/CreateConferenceGroupEndpointTest.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ class CreateConferenceGroupEndpointTest : ProxerTest() {
4545
.execute()
4646
}
4747

48-
request.body.readUtf8() shouldEqual "topic=topic&text=message&users=someUser&users=anotherUser&users=testUser"
48+
request.body.readUtf8() shouldEqual """
49+
topic=topic&text=message&users%5B%5D=someUser&users%5B%5D=anotherUser&users%5B%5D=testUser
50+
""".trimIndent().replace("\n", "")
4951
}
5052
}

library/src/test/kotlin/me/proxer/library/internal/interceptor/HeaderInterceptorTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class HeaderInterceptorTest : ProxerTest() {
3535
api.notifications.news().build().execute()
3636
}
3737

38-
request.headers.get("proxer-api-key") shouldEqual "mock-key"
38+
request.headers["proxer-api-key"] shouldEqual "mock-key"
3939
}
4040

4141
@Test
@@ -44,7 +44,7 @@ class HeaderInterceptorTest : ProxerTest() {
4444
api.notifications.news().build().execute()
4545
}
4646

47-
request.headers.get("User-Agent") shouldEqual "ProxerLibJava/$VERSION"
47+
request.headers["User-Agent"] shouldEqual "ProxerLibJava/$VERSION"
4848
}
4949

5050
@Test

0 commit comments

Comments
 (0)