From be20f9e560c7313295ef710812577712d8582f18 Mon Sep 17 00:00:00 2001 From: "marcin.cebo" Date: Thu, 5 Dec 2024 14:26:55 +0100 Subject: [PATCH] Fix parameter name in manageChannelMembers --- .../src/jvmMain/kotlin/com/pubnub/api/PubNub.kt | 4 ++-- .../api/integration/ObjectsIntegrationTest.kt | 13 +++++-------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/pubnub-kotlin/pubnub-kotlin-api/src/jvmMain/kotlin/com/pubnub/api/PubNub.kt b/pubnub-kotlin/pubnub-kotlin-api/src/jvmMain/kotlin/com/pubnub/api/PubNub.kt index f714f7e7a..18b819ea6 100644 --- a/pubnub-kotlin/pubnub-kotlin-api/src/jvmMain/kotlin/com/pubnub/api/PubNub.kt +++ b/pubnub-kotlin/pubnub-kotlin-api/src/jvmMain/kotlin/com/pubnub/api/PubNub.kt @@ -1868,7 +1868,7 @@ actual interface PubNub : StatusEmitter, EventEmitter { * * @param channel Channel name * @param usersToSet Collection of members to add to the channel. @see [com.pubnub.api.models.consumer.objects.member.PNMember.Partial] - * @param usersToRemove Members to remove from channel. + * @param usersIdsToRemove Members to remove from channel. * @param limit Number of objects to return in the response. * Default is 100, which is also the maximum value. * Set limit to 0 (zero) and includeCount to true if you want to retrieve only a result count. @@ -1886,7 +1886,7 @@ actual interface PubNub : StatusEmitter, EventEmitter { fun manageChannelMembers( channel: String, usersToSet: Collection, - usersToRemove: Collection, + usersIdsToRemove: Collection, limit: Int? = null, page: PNPage? = null, filter: String? = null, diff --git a/pubnub-kotlin/pubnub-kotlin-impl/src/integrationTest/kotlin/com/pubnub/api/integration/ObjectsIntegrationTest.kt b/pubnub-kotlin/pubnub-kotlin-impl/src/integrationTest/kotlin/com/pubnub/api/integration/ObjectsIntegrationTest.kt index 53ec5c7da..34375bdbe 100644 --- a/pubnub-kotlin/pubnub-kotlin-impl/src/integrationTest/kotlin/com/pubnub/api/integration/ObjectsIntegrationTest.kt +++ b/pubnub-kotlin/pubnub-kotlin-impl/src/integrationTest/kotlin/com/pubnub/api/integration/ObjectsIntegrationTest.kt @@ -540,11 +540,8 @@ class ObjectsIntegrationTest : BaseIntegrationTest() { pubnub.manageChannelMembers( channel = channel, usersToSet = listOf(PNMember.Partial(uuidId = testUserId01, status = status01, type = type01)), - usersToRemove = listOf(), - include = MemberInclude( - includeStatus = true, - includeType = true, - ) + usersIdsToRemove = listOf(), + include = MemberInclude(includeStatus = true, includeType = true) ).sync() val getAllResult = @@ -585,7 +582,7 @@ class ObjectsIntegrationTest : BaseIntegrationTest() { pubnub.manageChannelMembers( channel = channel, usersToSet = listOf(), - usersToRemove = listOf(testUserId01, testUserId02), + usersIdsToRemove = listOf(testUserId01, testUserId02), ).sync().data assertThat(removeResult, not(containsInAnyOrder(testUuidMatcher, otherTestUuidMatcher))) @@ -601,7 +598,7 @@ class ObjectsIntegrationTest : BaseIntegrationTest() { pubnub.manageChannelMembers( channel = channel, usersToSet = listOf(PNMember.Partial(uuidId = testUserId01, status = status01)), - usersToRemove = listOf(), + usersIdsToRemove = listOf(), ).sync() val getAllResult = @@ -635,7 +632,7 @@ class ObjectsIntegrationTest : BaseIntegrationTest() { pubnub.manageChannelMembers( channel = channel, usersToSet = listOf(), - usersToRemove = listOf(testUserId01, testUserId02), + usersIdsToRemove = listOf(testUserId01, testUserId02), ).sync().data assertThat(removeResult, not(containsInAnyOrder(testUuidMatcher, otherTestUuidMatcher)))