Skip to content

Commit 04efeb7

Browse files
Merge pull request #85 from sendbird/release/ktx/4.30.0
4.30.0
2 parents 7b4241d + c07efb2 commit 04efeb7

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

CHANGELOG_KTX.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,50 @@
11
# Changelog
2+
## v4.30.0 (Oct 22, 2025)
3+
### Features
4+
5+
- Added `onConnectionDelayed` callback to `ConnectionHandler`.
6+
- A new callback method that is invoked when the server is overloaded. This callback provides information about the delay time before automatic reconnection. After the delayed time period, the SDK automatically initiates reconnection and triggers the callback sequence: `onReconnectStarted``onReconnectSucceeded`
7+
```kotlin
8+
interface ConnectionHandler {
9+
fun onConnected(userId: String) {}
10+
fun onDisconnected(userId: String) {}
11+
fun onReconnectStarted() {}
12+
fun onReconnectSucceeded() {}
13+
fun onReconnectFailed() {}
14+
15+
/**
16+
* A callback for when the connection is delayed.
17+
*
18+
* @param retryAfter The time in seconds to wait before the next reconnection attempt.
19+
*/
20+
fun onConnectionDelayed(retryAfter: Long) {}
21+
}
22+
23+
runCatching {
24+
SendbirdChat.awaitConnect(USER_ID, AUTH_TOKEN)
25+
}.onSuccess { user ->
26+
// Connection successful
27+
}.onFailure { e ->
28+
val sendbirdException = e as SendbirdException
29+
if (sendbirdException.code == SendbirdError.ERR_CONNECTION_DELAYED) {
30+
val data = sendbirdException.data
31+
// The delay time in seconds before automatic reconnection
32+
val retryAfter: Long = data["retry_after"] as? Long ?: 0
33+
// Server-provided reason code for the delay
34+
val message = data["message"] as? String ?: ""
35+
// Detailed error message explaining the delay
36+
val reasonCode: Int = data["reason_code"] as? Int ?: 0
37+
38+
// The SDK will automatically retry after the specified delay time
39+
// and the result will be notified through ConnectionHandler.onReconnectSucceeded().
40+
}
41+
}
42+
```
43+
- Added `SendbirdChat.Options.setTypingIndicatorInvalidateTime(invalidateTimeMillis: Long)`
44+
- Sets typing indicator invalidation time. Defaults to 10000 (10 seconds)
45+
46+
### Improvements
47+
- Added a condition in `AIAgentGroupChannelListQuery.belongsTo()` to exclude non–AI Agent and non–Desk channels from the query results.
248
## v4.29.0 (Sep 25, 2025)
349
### Features
450
- Added new properties to `Conversation`:

0 commit comments

Comments
 (0)