Skip to content

Commit

Permalink
Merge pull request #100 from sendbird/v4.2.7
Browse files Browse the repository at this point in the history
Add 4.2.7.
  • Loading branch information
sf-tyler-jeong authored Mar 21, 2024
2 parents 3b62405 + 35e7df4 commit 7b9b69d
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 12 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
## v4.2.7 (Mar 21, 2024)

### Improvements
- Updated dependency range for http, uuid and logger packages
- Fixed the exception regarding encrypt package

## v4.2.6 (Mar 20, 2024)

### Improvements
- Fix the bug regarding reaction payload parsing
- Fixed the bug regarding reaction payload parsing

## v4.2.5 (Mar 12, 2024)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Before installing Sendbird Chat SDK, you need to create a Sendbird application o

```yaml
dependencies:
sendbird_chat_sdk: ^4.2.6
sendbird_chat_sdk: ^4.2.7
```
- 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 @@ -60,7 +60,7 @@ part 'chat_notifications.dart';
part 'chat_push.dart';
part 'chat_user.dart';

const sdkVersion = '4.2.6';
const sdkVersion = '4.2.7';

// Internal implementation for main class. Do not directly access this class.
class Chat with WidgetsBindingObserver {
Expand Down
9 changes: 6 additions & 3 deletions lib/src/internal/main/chat_manager/session_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,14 @@ class SessionManager {
..addAll(randomStringData);
}

final base64UserId = base64.encode(userId24Data);
String base64UserId = base64.encode(userId24Data);
if (base64UserId.length > 16) {
base64UserId = base64UserId.substring(0, 16);
}
prefs.setString(_userIdKeyPath, base64UserId);

final key = Key.fromUtf8(base64UserId);
final iv = IV.fromLength(16);
final iv = IV.fromUtf8(base64UserId);
final encrypter = Encrypter(AES(key));
final encryptedData = encrypter.encrypt(sessionKey, iv: iv);
prefs.setString(_sessionKeyPath, encryptedData.base64);
Expand All @@ -188,7 +191,7 @@ class SessionManager {
}

final key = Key.fromUtf8(encryptedUserId);
final iv = IV.fromLength(16);
final iv = IV.fromUtf8(encryptedUserId);
final encrypter = Encrypter(AES(key));
final encryptedSessionKey = prefs.getString(_sessionKeyPath);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ class GroupChannel extends BaseChannel {
@JsonKey(name: 'ts_message_offset')
int? messageOffsetTimestamp;

/// The message survival seconds in this channel.
int messageSurvivalSeconds;

/// The pinned message ids of the channel.
Expand Down
1 change: 0 additions & 1 deletion lib/src/public/core/message/base_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class BaseMessage extends RootMessage {
/// The thread info of the message.
ThreadInfo? threadInfo;

/// The message's survival seconds.
@JsonKey(defaultValue: -1)
int? messageSurvivalSeconds;

Expand Down
8 changes: 4 additions & 4 deletions 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.6
version: 4.2.7
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 All @@ -18,12 +18,12 @@ dependencies:
flutter:
sdk: flutter
collection: ^1.17.0
uuid: ^3.0.7
uuid: '>=3.0.7 <5.0.0'
json_annotation: ^4.8.1
encrypt: ^5.0.1
shared_preferences: ^2.2.2
http: ^0.13.6
logger: ^1.4.0
http: '>=0.13.6 <2.0.0'
logger: '>=1.4.0 <3.0.0'
mime: ^1.0.4
connectivity_plus: ^5.0.1
http_parser: ^4.0.2
Expand Down

0 comments on commit 7b9b69d

Please sign in to comment.