Skip to content

Commit

Permalink
Merge pull request #107 from sendbird/v4.2.13
Browse files Browse the repository at this point in the history
Add 4.2.13.
  • Loading branch information
sf-tyler-jeong authored Apr 30, 2024
2 parents 266eb64 + 229098e commit 406c9ab
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 13 deletions.
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
## v4.2.12 (Apr 24, 2024)
## v4.2.13 (Apr 30, 2024)

### Improvements
- Fixed the bugs regarding session update

### Breaking changes
- The return type for `getUndeliveredMembers()` was updated from `List<Member>` to `List<Member>?`
## v4.2.12 (Apr 24, 2024)

### Features
- Updated dependency range for `connectivity_plus` package from `^5.0.1` to `>=5.0.1 <7.0.0`
Expand All @@ -10,6 +12,9 @@
- Fixed `MessageCollection` regarding `resetMyHistory()` in `GroupChannel`
- Fixed `removeFailedMessage()` and `removeAllFailedMessages()` in `MessageCollection`
- Fixed the bugs regarding message change log, pending message removal, typing status and delivered status
- Added improvements on `getUndeliveredMembers()` method to prevent a potential problem
The return type for `getUndeliveredMembers()` was updated from `List<Member>` to `List<Member>?`
Please update this part of your code if you use `getUndeliveredMembers()`
- Improved stability

## v4.2.11 (Apr 18, 2024)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Before installing Sendbird Chat SDK, you need to create a Sendbird application o

```yaml
dependencies:
sendbird_chat_sdk: ^4.2.12
sendbird_chat_sdk: ^4.2.13
```
- Run `flutter pub get` command in your project directory.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/internal/main/chat/chat.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ part 'chat_notifications.dart';
part 'chat_push.dart';
part 'chat_user.dart';

const sdkVersion = '4.2.12';
const sdkVersion = '4.2.13';

// Internal implementation for main class. Do not directly access this class.
class Chat with WidgetsBindingObserver {
Expand Down
3 changes: 1 addition & 2 deletions lib/src/internal/main/chat_manager/command_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ class CommandManager {
} else if (cmd.payload['expires_in'] != null
? cmd.payload['expires_in'] < 0
: false) {
// If session token is expired, then log out
await _chat.connectionManager.disconnect(logout: true);
_chat.eventManager.notifySessionClosed();
} else {
await _chat.sessionManager.updateSessionKey();
}
Expand Down Expand Up @@ -707,7 +707,6 @@ class CommandManager {
'cmd: ${cmd.cmd}, errorMessage: ${cmd.errorMessage ?? ''}');

if (cmd.errorCode == SendbirdError.sessionKeyExpired) {
await _chat.connectionManager.disconnect(logout: true);
await _chat.sessionManager.updateSessionKey();
} else if (cmd.errorCode == SendbirdError.accessTokenRevoked) {
if (_chat.chatContext.loginCompleter != null &&
Expand Down
10 changes: 5 additions & 5 deletions lib/src/internal/main/chat_manager/session_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ class SessionManager {

setSessionKey(null);

// If websocket exists, ws request to update session key
if (_chat.connectionManager.isConnected()) {
await _chat.commandManager.updateSessionKey();
return;
}
// If websocket exists, ws request to update session key => Check server error
// if (_chat.connectionManager.isConnected()) {
// await _chat.commandManager.updateSessionKey();
// return;
// }

final completer = Completer();
_updateSessionKeyCompleterList.add(completer);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: sendbird_chat_sdk
description: With Sendbird Chat for Flutter, you can easily build an in-app chat with all the essential messaging features.
version: 4.2.12
version: 4.2.13
homepage: https://sendbird.com
repository: https://github.com/sendbird/sendbird-chat-sdk-flutter
documentation: https://sendbird.com/docs/chat/sdk/v4/flutter/getting-started/send-first-message
Expand Down

0 comments on commit 406c9ab

Please sign in to comment.