diff --git a/pubnub-chat-impl/src/commonMain/kotlin/com/pubnub/chat/internal/util/Utils.kt b/pubnub-chat-impl/src/commonMain/kotlin/com/pubnub/chat/internal/util/Utils.kt index 8e93b5f7..d596fab6 100644 --- a/pubnub-chat-impl/src/commonMain/kotlin/com/pubnub/chat/internal/util/Utils.kt +++ b/pubnub-chat-impl/src/commonMain/kotlin/com/pubnub/chat/internal/util/Utils.kt @@ -1,5 +1,6 @@ package com.pubnub.chat.internal.util +import com.pubnub.api.models.consumer.history.PNFetchMessageItem import com.pubnub.api.models.consumer.history.PNFetchMessagesResult internal fun getPhraseToLookFor(text: String, separator: String): String? { @@ -19,6 +20,6 @@ internal fun getPhraseToLookFor(text: String, separator: String): String? { return splitWords.joinToString(" ") } -expect fun urlDecode(encoded: String): String +internal expect fun urlDecode(encoded: String): String -internal val PNFetchMessagesResult.channelsUrlDecoded get() = channels.mapKeys { urlDecode(it.key) } +internal val PNFetchMessagesResult.channelsUrlDecoded: Map> get() = channels.mapKeys { urlDecode(it.key) } diff --git a/pubnub-chat-impl/src/iosMain/kotlin/com/pubnub/chat/internal/util/Utils.ios.kt b/pubnub-chat-impl/src/iosMain/kotlin/com/pubnub/chat/internal/util/Utils.ios.kt index a128fc4a..81ae4aed 100644 --- a/pubnub-chat-impl/src/iosMain/kotlin/com/pubnub/chat/internal/util/Utils.ios.kt +++ b/pubnub-chat-impl/src/iosMain/kotlin/com/pubnub/chat/internal/util/Utils.ios.kt @@ -1,5 +1,5 @@ package com.pubnub.chat.internal.util -actual fun urlDecode(encoded: String): String { +internal actual fun urlDecode(encoded: String): String { TODO("Not yet implemented") } diff --git a/pubnub-chat-impl/src/jsMain/kotlin/com/pubnub/chat/internal/util/Utils.js.kt b/pubnub-chat-impl/src/jsMain/kotlin/com/pubnub/chat/internal/util/Utils.js.kt index 8319b4a0..b6dc5c22 100644 --- a/pubnub-chat-impl/src/jsMain/kotlin/com/pubnub/chat/internal/util/Utils.js.kt +++ b/pubnub-chat-impl/src/jsMain/kotlin/com/pubnub/chat/internal/util/Utils.js.kt @@ -1,5 +1,5 @@ package com.pubnub.chat.internal.util -actual fun urlDecode(encoded: String): String = decodeURIComponent(encoded) +internal actual fun urlDecode(encoded: String): String = decodeURIComponent(encoded) external fun decodeURIComponent(encoded: String): String diff --git a/pubnub-chat-impl/src/jvmMain/kotlin/com/pubnub/chat/internal/util/Utils.jvm.kt b/pubnub-chat-impl/src/jvmMain/kotlin/com/pubnub/chat/internal/util/Utils.jvm.kt index 5cb02d19..65e1ab11 100644 --- a/pubnub-chat-impl/src/jvmMain/kotlin/com/pubnub/chat/internal/util/Utils.jvm.kt +++ b/pubnub-chat-impl/src/jvmMain/kotlin/com/pubnub/chat/internal/util/Utils.jvm.kt @@ -2,4 +2,4 @@ package com.pubnub.chat.internal.util import java.net.URLDecoder -actual fun urlDecode(encoded: String): String = URLDecoder.decode(encoded, Charsets.UTF_8.name()) +internal actual fun urlDecode(encoded: String): String = URLDecoder.decode(encoded, Charsets.UTF_8.name())