From 64fe45fbfe221b36afbb2bf3ec0daf21db7c600d Mon Sep 17 00:00:00 2001
From: jguz-pubnub <102806147+jguz-pubnub@users.noreply.github.com>
Date: Mon, 16 Dec 2024 15:55:51 +0100
Subject: [PATCH] Internal fixes (Apple platforms) (#324)
fix(custom-field): fix for initializing `KMPAnyJSON` instance
fix(pubnub): add missing `filter` parameter for `getChannelMembers` method
---
.pubnub.yml | 13 +++++++++----
CHANGELOG.md | 6 ++++++
README.md | 2 +-
gradle.properties | 2 +-
.../appleMain/kotlin/com/pubnub/api/PubNubImpl.kt | 1 +
.../objects/channel/SetChannelMetadata.ios.kt | 2 +-
.../objects/member/SetChannelMembers.ios.kt | 2 +-
.../objects/membership/ManageMemberships.ios.kt | 2 +-
.../endpoints/objects/uuid/SetUUIDMetadata.ios.kt | 2 +-
.../pubnub/api/endpoints/presence/SetState.ios.kt | 2 +-
.../kotlin/com/pubnub/api/legacy/PubNubImplTest.kt | 2 +-
11 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/.pubnub.yml b/.pubnub.yml
index 8c93d99f5..6048ac17a 100644
--- a/.pubnub.yml
+++ b/.pubnub.yml
@@ -1,9 +1,9 @@
name: kotlin
-version: 10.3.1
+version: 10.3.2
schema: 1
scm: github.com/pubnub/kotlin
files:
- - build/libs/pubnub-kotlin-10.3.1-all.jar
+ - build/libs/pubnub-kotlin-10.3.2-all.jar
sdks:
-
type: library
@@ -23,8 +23,8 @@ sdks:
-
distribution-type: library
distribution-repository: maven
- package-name: pubnub-kotlin-10.3.1
- location: https://repo.maven.apache.org/maven2/com/pubnub/pubnub-kotlin/10.3.1/pubnub-kotlin-10.3.1.jar
+ package-name: pubnub-kotlin-10.3.2
+ location: https://repo.maven.apache.org/maven2/com/pubnub/pubnub-kotlin/10.3.2/pubnub-kotlin-10.3.2.jar
supported-platforms:
supported-operating-systems:
Android:
@@ -121,6 +121,11 @@ sdks:
license-url: https://www.apache.org/licenses/LICENSE-2.0.txt
is-required: Required
changelog:
+ - date: 2024-12-16
+ version: v10.3.2
+ changes:
+ - type: improvement
+ text: "Internal fixes."
- date: 2024-12-12
version: v10.3.1
changes:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f388f4fc6..734bc8243 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+## v10.3.2
+December 16 2024
+
+#### Modified
+- Internal fixes.
+
## v10.3.1
December 12 2024
diff --git a/README.md b/README.md
index 57b3beae7..55bc5713e 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ You will need the publish and subscribe keys to authenticate your app. Get your
com.pubnub
pubnub-kotlin
- 10.3.1
+ 10.3.2
```
diff --git a/gradle.properties b/gradle.properties
index 607ee4952..5d719c78c 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -18,7 +18,7 @@ RELEASE_SIGNING_ENABLED=true
SONATYPE_HOST=DEFAULT
SONATYPE_AUTOMATIC_RELEASE=false
GROUP=com.pubnub
-VERSION_NAME=10.3.1
+VERSION_NAME=10.3.2
POM_PACKAGING=jar
POM_NAME=PubNub SDK
diff --git a/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/PubNubImpl.kt b/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/PubNubImpl.kt
index c7c3a3556..b872f34a1 100644
--- a/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/PubNubImpl.kt
+++ b/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/PubNubImpl.kt
@@ -756,6 +756,7 @@ class PubNubImpl(private val pubNubObjC: KMPPubNub) : PubNub {
channel = channel,
limit = limit,
page = page,
+ filter = filter,
sort = sort,
include = MemberInclude(
includeTotalCount = includeCount,
diff --git a/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/channel/SetChannelMetadata.ios.kt b/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/channel/SetChannelMetadata.ios.kt
index e0a2d1d68..db1ea24c5 100644
--- a/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/channel/SetChannelMetadata.ios.kt
+++ b/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/channel/SetChannelMetadata.ios.kt
@@ -34,7 +34,7 @@ class SetChannelMetadataImpl(
metadataId = metadataId,
name = name,
description = description,
- custom = KMPAnyJSON(value = custom?.value),
+ custom = KMPAnyJSON(custom),
includeCustom = includeCustom,
type = type,
status = status,
diff --git a/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/member/SetChannelMembers.ios.kt b/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/member/SetChannelMembers.ios.kt
index 7af0cb654..fe23da351 100644
--- a/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/member/SetChannelMembers.ios.kt
+++ b/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/member/SetChannelMembers.ios.kt
@@ -41,7 +41,7 @@ class SetChannelMembersImpl(
override fun async(callback: Consumer>) {
pubnub.setChannelMembersWithChannel(
channel = channelId,
- users = users.map { KMPUserMetadata(id = it.uuid, custom = KMPAnyJSON(it.custom?.value), status = it.status) },
+ users = users.map { KMPUserMetadata(id = it.uuid, custom = KMPAnyJSON(it.custom), status = it.status) },
limit = limit?.let { NSNumber(it) },
page = createPubNubHashedPage(from = page),
filter = filter,
diff --git a/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/membership/ManageMemberships.ios.kt b/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/membership/ManageMemberships.ios.kt
index f043b1559..d21ef4228 100644
--- a/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/membership/ManageMemberships.ios.kt
+++ b/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/membership/ManageMemberships.ios.kt
@@ -41,7 +41,7 @@ class AddMembershipsImpl(
) : ManageMemberships {
override fun async(callback: Consumer>) {
pubnub.setMembershipsWithChannels(
- channels = channels.map { KMPChannelMetadata(it.channel, KMPAnyJSON(it.custom?.value), it.status) },
+ channels = channels.map { KMPChannelMetadata(it.channel, KMPAnyJSON(it.custom), it.status) },
userId = userId,
limit = limit?.let { NSNumber(it) },
page = createPubNubHashedPage(from = page),
diff --git a/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/uuid/SetUUIDMetadata.ios.kt b/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/uuid/SetUUIDMetadata.ios.kt
index d0ab589a6..4e2ff4c22 100644
--- a/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/uuid/SetUUIDMetadata.ios.kt
+++ b/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/objects/uuid/SetUUIDMetadata.ios.kt
@@ -38,7 +38,7 @@ class SetUUIDMetadataImpl(
externalId = externalId,
profileUrl = profileUrl,
email = email,
- custom = KMPAnyJSON(value = custom?.value),
+ custom = KMPAnyJSON(custom),
includeCustom = includeCustom,
type = type,
status = status,
diff --git a/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/presence/SetState.ios.kt b/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/presence/SetState.ios.kt
index 1bbca2a4e..a9ccf1706 100644
--- a/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/presence/SetState.ios.kt
+++ b/pubnub-kotlin/pubnub-kotlin-api/src/appleMain/kotlin/com/pubnub/api/endpoints/presence/SetState.ios.kt
@@ -28,7 +28,7 @@ class SetStateImpl(
pubnub.setPresenceStateWithChannels(
channels = channels,
channelGroups = channelGroups,
- state = KMPAnyJSON(value = state),
+ state = KMPAnyJSON(state),
onSuccess = callback.onSuccessHandler { PNSetStateResult(state = JsonElementImpl(it)) },
onFailure = callback.onFailureHandler()
)
diff --git a/pubnub-kotlin/pubnub-kotlin-impl/src/test/kotlin/com/pubnub/api/legacy/PubNubImplTest.kt b/pubnub-kotlin/pubnub-kotlin-impl/src/test/kotlin/com/pubnub/api/legacy/PubNubImplTest.kt
index 70c598435..3f771ca96 100644
--- a/pubnub-kotlin/pubnub-kotlin-impl/src/test/kotlin/com/pubnub/api/legacy/PubNubImplTest.kt
+++ b/pubnub-kotlin/pubnub-kotlin-impl/src/test/kotlin/com/pubnub/api/legacy/PubNubImplTest.kt
@@ -56,7 +56,7 @@ class PubNubImplTest : BaseTest() {
fun getVersionAndTimeStamp() {
val version = PubNubImpl.SDK_VERSION
val timeStamp = PubNubImpl.timestamp()
- assertEquals("10.3.1", version)
+ assertEquals("10.3.2", version)
assertTrue(timeStamp > 0)
}