Skip to content

Commit

Permalink
Fix for initializing KMPAnyJSON instance
Browse files Browse the repository at this point in the history
  • Loading branch information
jguz-pubnub committed Dec 16, 2024
1 parent 23d303a commit 3c7b9d3
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class SetChannelMembersImpl(
override fun async(callback: Consumer<Result<PNMemberArrayResult>>) {
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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AddMembershipsImpl(
) : ManageMemberships {
override fun async(callback: Consumer<Result<PNChannelMembershipArrayResult>>) {
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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)
Expand Down

0 comments on commit 3c7b9d3

Please sign in to comment.