Skip to content

Commit 5ef7b2e

Browse files
committed
chore: update CHANGELOG.md and UPGRADING.md
1 parent 8a3723b commit 5ef7b2e

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
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)

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

0 commit comments

Comments
 (0)