Skip to content

Commit

Permalink
Merge pull request #97 from sendbird/v4.2.4
Browse files Browse the repository at this point in the history
Add 4.2.4.
  • Loading branch information
sf-tyler-jeong authored Mar 8, 2024
2 parents 8dd2e61 + e5b43d2 commit c33bfb2
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 13 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## v4.2.4 (Mar 8, 2024)

### Improvements
- Fixed the exception regarding unmodifiable list

## v4.2.3 (Mar 4, 2024)

### Improvements
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.3
sendbird_chat_sdk: ^4.2.4
```
- Run `flutter pub get` command in your project directory.
Expand Down
7 changes: 1 addition & 6 deletions lib/src/internal/db/schema/message/c_base_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,6 @@ class CBaseMessage extends CRootMessage {
? await cBaseMessage.sender?.toSender(chat, isar)
: null;

for (final userId in cBaseMessage.mentionedUsers) {
final user = await CUser.get(chat, isar, userId);
if (user != null) {
baseMessage.mentionedUsers.add(user);
}
}
return baseMessage;
}

Expand Down Expand Up @@ -213,6 +207,7 @@ class CThreadInfo {
Future<ThreadInfo> toThreadInfo(Chat chat, Isar isar) async {
final threadInfo = ThreadInfo()
..replyCount = replyCount
..mostRepliesUsers = []
..lastRepliedAt = lastRepliedAt
..updatedAt = updatedAt;

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.3';
const sdkVersion = '4.2.4';

// Internal implementation for main class. Do not directly access this class.
class Chat with WidgetsBindingObserver {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ extension GroupChannelCollectionManager on CollectionManager {
}

if (!isChannelExists) {
if (await channelCollection.canAddChannel(eventSource, addedChannel)) {
if (await channelCollection.canAddChannel(
eventSource, addedChannel)) {
addedChannelsForEvent.add(addedChannel);
}
}
Expand All @@ -202,7 +203,8 @@ extension GroupChannelCollectionManager on CollectionManager {
// Need to compare channel properties with updatedChannel
// when eventSource is CollectionEventSource.channelChangeLogs (?)

if (await channelCollection.canAddChannel(eventSource, updatedChannel,
if (await channelCollection.canAddChannel(
eventSource, updatedChannel,
checkToUpdateChannel: true)) {
channelCollection.channelList[index] = updatedChannel;
updatedChannelsForEvent.add(updatedChannel);
Expand All @@ -218,7 +220,8 @@ extension GroupChannelCollectionManager on CollectionManager {

if (eventSource == CollectionEventSource.channelChangeLogs &&
!isUpdatedChannelInChannelList) {
if (await channelCollection.canAddChannel(eventSource, updatedChannel)) {
if (await channelCollection.canAddChannel(
eventSource, updatedChannel)) {
addedChannelsForEvent.add(updatedChannel);
}
}
Expand Down
2 changes: 2 additions & 0 deletions lib/src/public/core/message/root_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class RootMessage {
}
}
}

if (_mentionedUsers.isEmpty) return [];
return _mentionedUsers;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class MessageSearchQuery extends BaseQuery {
targetFields: targetFields,
),
);

hasNext = res.hasNext;
totalCount = res.totalCount;
token = res.next;
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.3
version: 4.2.4
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 c33bfb2

Please sign in to comment.