Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: kmp-chat
version: 0.11.2
version: 0.12.0
schema: 1
scm: github.com/pubnub/kmp-chat
sdks:
Expand All @@ -21,8 +21,8 @@ sdks:
-
distribution-type: library
distribution-repository: maven
package-name: pubnub-chat-0.11.2
location: https://repo.maven.apache.org/maven2/com/pubnub/pubnub-chat/0.11.2/
package-name: pubnub-chat-0.12.0
location: https://repo.maven.apache.org/maven2/com/pubnub/pubnub-chat/0.12.0/
supported-platforms:
supported-operating-systems:
Android:
Expand Down Expand Up @@ -77,6 +77,11 @@ sdks:
license-url: https://github.com/pubnub/kotlin/blob/master/LICENSE
is-required: Required
changelog:
- date: 2025-03-14
version: 0.12.0
changes:
- type: feature
text: "Added possibility to invite users to public channels."
- date: 2025-03-07
version: 0.11.2
changes:
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ let package = Package(
targets: [
.binaryTarget(
name: "PubNubChatRemoteBinaryPackage",
url: "https://github.com/pubnub/kmp-chat/releases/download/kotlin-0.11.2/PubNubChat.xcframework.zip",
url: "https://github.com/pubnub/kmp-chat/releases/download/kotlin-0.12.0/PubNubChat.xcframework.zip",
checksum: "3153a4429665fe51861cfdc3b63cdb873260e777dcb41d52f14301698b2b2a91"
)
]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ You will need the publish and subscribe keys to authenticate your app. Get your
<dependency>
<groupId>com.pubnub</groupId>
<artifactId>pubnub-chat</artifactId>
<version>0.11.2</version>
<version>0.12.0</version>
</dependency>
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ class PubNubBaseKotlinMultiplatformPlugin : Plugin<Project> {

if (enableJsTarget) {
js { ->
project.findProperty("JS_MODULE_NAME")?.toString()?.let { jsModuleName ->
moduleName = jsModuleName
}
nodejs {
testTask {
it.environment("MOCHA_OPTIONS", "--exit")
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SONATYPE_HOST=DEFAULT
SONATYPE_AUTOMATIC_RELEASE=false
GROUP=com.pubnub
POM_PACKAGING=jar
VERSION_NAME=0.11.7
VERSION_NAME=0.12.0


POM_NAME=PubNub Chat SDK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import com.pubnub.chat.internal.PINNED_MESSAGE_TIMETOKEN
import com.pubnub.chat.internal.defaultGetMessageResponseBody
import com.pubnub.chat.internal.error.PubNubErrorMessage.CANNOT_QUOTE_MESSAGE_FROM_OTHER_CHANNELS
import com.pubnub.chat.internal.error.PubNubErrorMessage.CAN_NOT_STREAM_CHANNEL_UPDATES_ON_EMPTY_LIST
import com.pubnub.chat.internal.error.PubNubErrorMessage.CHANNEL_INVITES_ARE_NOT_SUPPORTED_IN_PUBLIC_CHATS
import com.pubnub.chat.internal.error.PubNubErrorMessage.ERROR_HANDLING_ONMESSAGE_EVENT
import com.pubnub.chat.internal.error.PubNubErrorMessage.FAILED_TO_RETRIEVE_HISTORY_DATA
import com.pubnub.chat.internal.error.PubNubErrorMessage.MODERATION_CAN_BE_SET_ONLY_BY_CLIENT_HAVING_SECRET_KEY
Expand Down Expand Up @@ -366,9 +365,6 @@ abstract class BaseChannel<C : Channel, M : Message>(
}

override fun invite(user: User): PNFuture<Membership> {
if (this.type == ChannelType.PUBLIC) {
return log.logErrorAndReturnException(CHANNEL_INVITES_ARE_NOT_SUPPORTED_IN_PUBLIC_CHATS).asFuture()
}
return getMembers(filter = user.uuidFilterString).thenAsync { channelMembers: MembersResponse ->
if (channelMembers.members.isNotEmpty()) {
return@thenAsync channelMembers.members.first().asFuture()
Expand Down Expand Up @@ -401,9 +397,6 @@ abstract class BaseChannel<C : Channel, M : Message>(
}

override fun inviteMultiple(users: Collection<User>): PNFuture<List<Membership>> {
if (this.type == ChannelType.PUBLIC) {
return log.logErrorAndReturnException(CHANNEL_INVITES_ARE_NOT_SUPPORTED_IN_PUBLIC_CHATS).asFuture()
}
return chat.pubNub.setChannelMembers(
this.id,
users.map { PNMember.Partial(it.id) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ internal object PubNubErrorMessage {
internal const val CHANNEL_NOT_EXIST = "Channel does not exist"
internal const val USER_NOT_EXIST = "User does not exist"
internal const val FAILED_TO_SOFT_DELETE_CHANNEL = "Failed to soft delete the channel"
internal const val CHANNEL_INVITES_ARE_NOT_SUPPORTED_IN_PUBLIC_CHATS =
"Channel invites are not supported in Public chats."
internal const val MODERATION_CAN_BE_SET_ONLY_BY_CLIENT_HAVING_SECRET_KEY =
"Moderation restrictions can only be set by clients initialized with a Secret Key."
internal const val STORE_USER_ACTIVITY_INTERVAL_SHOULD_BE_AT_LEAST_1_MIN =
Expand Down