Skip to content

Commit 9c04f31

Browse files
authored
Merge pull request #162 from ably/release/0.8.0
Release/0.8.0
2 parents 8bd425c + 5ef7b2e commit 9c04f31

File tree

4 files changed

+80
-3
lines changed

4 files changed

+80
-3
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Change Log
22

3+
## [0.8.0](https://github.com/ably/ably-chat-kotlin/tree/v0.8.0)
4+
5+
[Full Changelog](https://github.com/ably/ably-chat-kotlin/compare/v0.7.0...v0.8.0)
6+
7+
## What's Changed
8+
9+
The following features have been added in this release:
10+
11+
- **Protocol v4 support** Added support for Chat protocol v4, enabling enhanced message handling. [#161](https://github.com/ably/ably-chat-kotlin/pull/161)
12+
- **Destructuring syntax** Added destructuring syntax for subscription handling, providing more convenient API usage. [#159](https://github.com/ably/ably-chat-kotlin/pull/159)
13+
- **Custom JSON implementation** Replaced Gson with custom JSON implementation to reduce dependencies [#160](https://github.com/ably/ably-chat-kotlin/pull/160)
14+
15+
### Breaking changes
16+
17+
This release includes several breaking changes:
18+
19+
- `Message` structure has changed.
20+
- Replaced `Gson` with a custom JSON interface.
21+
- Presence Data must be a JsonObject.
22+
23+
For detailed migration instructions, please refer to the [Upgrading Guide](UPGRADING.md).
24+
325
## [0.7.0](https://github.com/ably/ably-chat-kotlin/tree/v0.7.0)
426

527
[Full Changelog](https://github.com/ably/ably-chat-kotlin/compare/v0.6.0...v0.7.0)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ The Ably Chat SDK is available on the Maven Central Repository. To include the d
4545
For Groovy:
4646

4747
```groovy
48-
implementation 'com.ably.chat:chat:0.7.0'
48+
implementation 'com.ably.chat:chat:0.8.0'
4949
```
5050

5151
For Kotlin Script (`build.gradle.kts`):
5252

5353
```kotlin
54-
implementation("com.ably.chat:chat:0.7.0")
54+
implementation("com.ably.chat:chat:0.8.0")
5555
```
5656

5757
## Releases

UPGRADING.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,61 @@
22

33
This guide provides detailed instructions on how to upgrade between versions of the Chat SDK.
44

5+
## 0.7.x to 0.8.x
6+
7+
### Protocol v4 changes
8+
9+
**Expected Impact: Medium**
10+
11+
The Chat SDK now supports protocol v4, which introduces changes to message structure and handling.
12+
13+
#### Message Structure Changes
14+
15+
**Before**
16+
17+
```kotlin
18+
val message: Message = getMessage()
19+
val versionSerial: String = message.serial
20+
val createdAt: Long = message.createdAt
21+
val updatedAt: Long = message.timestamp
22+
```
23+
24+
**After**
25+
26+
```kotlin
27+
val message: Message = getMessage()
28+
val versionSerial: String = message.version.serial
29+
val createdAt: Long = message.timestamp
30+
val updatedAt: Long = message.version.timestamp
31+
```
32+
33+
### Custom JSON Implementation
34+
35+
**Expected Impact: Low**
36+
37+
The SDK has replaced Gson with a custom JSON interface to reduce external dependencies.
38+
39+
Affected fields: `Message.metadata`, `RoomReaction.metadata`, `Presence.data`
40+
41+
To build a JSON object to send, use the `jsonObject` builder from `com.ably.chat.json`:
42+
43+
```kotlin
44+
presence.enter(jsonObject {
45+
put("status", "active")
46+
putObject("profile") {
47+
put("username", "John Doe")
48+
put("img", "https://example.com/img")
49+
}
50+
})
51+
```
52+
53+
### Presence Data JsonObject
54+
55+
**Expected Impact: Low**
56+
57+
Presence data must be a `JsonObject` rather than an arbitrary JSON value.
58+
The `enter()`, `leave()`, and `update()` methods now accept only a `JsonObject`.
59+
560
## 0.4.x to 0.5.x
661

762
### Room Reaction Wire Protocol

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ android.useAndroidX=true
1818

1919
# Maven Publish properties:
2020
GROUP=com.ably.chat
21-
VERSION_NAME=0.7.0
21+
VERSION_NAME=0.8.0
2222

2323
POM_INCEPTION_YEAR=2024
2424
POM_URL=https://github.com/ably/ably-chat-kotlin

0 commit comments

Comments
 (0)