Skip to content

Commit 5ab0f32

Browse files
authored
Merge pull request #179 from ably/release/0.9.0
2 parents 3839d32 + 78a1c48 commit 5ab0f32

File tree

4 files changed

+159
-3
lines changed

4 files changed

+159
-3
lines changed

CHANGELOG.md

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

3+
## [0.9.0](https://github.com/ably/ably-chat-kotlin/tree/v0.9.0)
4+
5+
[Full Changelog](https://github.com/ably/ably-chat-kotlin/compare/v0.8.0...v0.9.0)
6+
7+
## What's Changed
8+
9+
The following features have been added in this release:
10+
11+
- Added `get(serial: String)` in `Messages` to fetch messages by serial.
12+
- Added `clientReactions` in `MessageReactions` for filtering reaction summaries by client.
13+
- **chat-compose-extension promoted to stable** The Jetpack Compose extension module has been promoted from experimental to stable status.
14+
15+
### Breaking changes
16+
17+
This release includes several breaking changes:
18+
19+
- `MessageAction` enum no longer includes internal `Meta` and `Summary` values that were not part of the public API.
20+
- Interface-based listeners have been replaced with Kotlin function types for a more idiomatic API.
21+
- The Chat SDK now throws `ChatException` instead of `AblyException` for better error handling specificity.
22+
- Status properties have been changed from `current()` function to `current` property for cleaner syntax.
23+
- Import path changes: `ErrorInfo`, `SummaryClientIdCounts`, `SummaryClientIdList`, and `MessageAction` now import from `com.ably.chat` instead of other packages.
24+
25+
For detailed migration instructions, please refer to the [Upgrading Guide](UPGRADING.md).
26+
327
## [0.8.0](https://github.com/ably/ably-chat-kotlin/tree/v0.8.0)
428

529
[Full Changelog](https://github.com/ably/ably-chat-kotlin/compare/v0.7.0...v0.8.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.8.0'
48+
implementation 'com.ably.chat:chat:0.9.0'
4949
```
5050

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

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

5757
## Releases

UPGRADING.md

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

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

5+
## 0.8.x to 0.9.x
6+
7+
### MessageAction Enum
8+
9+
**Expected Impact: Low**
10+
11+
The `MessageAction` enum no longer includes internal `Meta` and `Summary` values. These values were not part of the public API and should not have been used in application code. The enum now only contains the three public action types: `MessageCreate`, `MessageUpdate`, and `MessageDelete`.
12+
13+
No code changes are required unless you were incorrectly using these internal values.
14+
15+
### Listener Functions
16+
17+
**Expected Impact: Low**
18+
19+
Interface-based listeners have been replaced with Kotlin function types for a more idiomatic API.
20+
This affects binary-compatibility mostly for all subscription methods throughout the SDK.
21+
22+
This change applies to all subscription methods including:
23+
- `Messages.subscribe()`
24+
- `Presence.subscribe()`
25+
- `RoomReactions.subscribe()`
26+
- `Occupancy.subscribe()`
27+
- `Typing.subscribe()`
28+
- `Room.onStatusChange()`
29+
- `Connection.onStatusChange()`
30+
31+
### Exception Handling
32+
33+
**Expected Impact: Medium**
34+
35+
The Chat SDK now throws `ChatException` instead of `AblyException`. This provides better error handling specificity for chat-related operations.
36+
37+
#### Code Changes Required
38+
39+
**Before**
40+
41+
```kotlin
42+
import io.ably.lib.types.AblyException
43+
44+
try {
45+
room.attach()
46+
} catch (e: AblyException) {
47+
// Handle error
48+
}
49+
```
50+
51+
**After**
52+
53+
```kotlin
54+
import com.ably.chat.*
55+
56+
try {
57+
room.attach()
58+
} catch (e: ChatException) {
59+
// Handle error
60+
}
61+
```
62+
63+
### Status Properties
64+
65+
**Expected Impact: Medium**
66+
67+
Status properties have been changed from `current()` function to `current` property for cleaner, more idiomatic Kotlin syntax.
68+
69+
#### Code Changes Required
70+
71+
**Before**
72+
73+
```kotlin
74+
val occupancyData = occupancy.current()
75+
val typingClients = typing.current()
76+
```
77+
78+
**After**
79+
80+
```kotlin
81+
val occupancyData = occupancy.current
82+
val typingClients = typing.current
83+
```
84+
85+
This change applies to:
86+
- `Occupancy.current`
87+
- `Typing.current`
88+
89+
### Import Path Changes
90+
91+
**Expected Impact: High**
92+
93+
Several types now import from `com.ably.chat` instead of their previous locations. This ensures consistency and clarity about which types are part of the Chat SDK public API.
94+
95+
#### Code Changes Required
96+
97+
**Before**
98+
99+
```kotlin
100+
import io.ably.lib.types.ErrorInfo
101+
import io.ably.lib.types.MessageAction
102+
```
103+
104+
**After**
105+
106+
```kotlin
107+
import com.ably.chat.*
108+
```
109+
110+
### Compose Extension
111+
112+
**Expected Impact: Low**
113+
114+
The `chat-compose-extension` module has been promoted from experimental to stable.
115+
Made extensions return `State<*>` instead of plain objects to avoid unnecessary recompositions:
116+
117+
**Before**
118+
119+
```kotlin
120+
val roomStatus = room.collectAsStatus()
121+
val connectionStatus = connection.collectAsStatus()
122+
val currentlyTyping = room.collectAsCurrentlyTyping()
123+
val presentMembers = room.collectAsPresenceMembers()
124+
val occupancy = room.collectAsOccupancy()
125+
```
126+
127+
**After**
128+
129+
```kotlin
130+
val roomStatus by room.collectAsStatus()
131+
val connectionStatus by connection.collectAsStatus()
132+
val currentlyTyping by room.collectAsCurrentlyTyping()
133+
val presentMembers by room.collectAsPresenceMembers()
134+
val occupancy by room.collectAsOccupancy()
135+
```
136+
5137
## 0.7.x to 0.8.x
6138

7139
### Protocol v4 changes

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.8.0
21+
VERSION_NAME=0.9.0
2222

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

0 commit comments

Comments
 (0)