Merge branch 'develop' into fix/857

This commit is contained in:
Salvatore Giordano
2022-02-01 09:33:22 +01:00
committed by GitHub
3 changed files with 13 additions and 1 deletions
+5
View File
@@ -4,6 +4,7 @@
- [[#857]](https://github.com/GetStream/stream-chat-flutter/issues/857) Channel now listens for member ban/unban and
updates the channel state with the latest data.
- [[#748]](https://github.com/GetStream/stream-chat-flutter/issues/748) `Message.user` are now also included while saving users in persistence.
🔄 Changed
@@ -18,6 +19,10 @@
- Fixed `unreadCount` after removing user from a channel.
- Added `client.queryBannedUsers`, `channel.queryBannedUsers` endpoint for querying banned users.
🐞 Fixed
- [[#871]](https://github.com/GetStream/stream-chat-flutter/issues/871) Fixed thread message deletion.
## 3.3.1
🐞 Fixed
@@ -1803,7 +1803,13 @@ class ChannelClientState {
if (replyCount == null || replyCount == 0) return;
addMessage(parentMessage.copyWith(replyCount: replyCount - 1));
updateThreadInfo(parentId, threads[parentId]!..remove(message));
updateThreadInfo(
parentId,
threads[parentId]!
..removeWhere(
(e) => e.id == message.id,
),
);
} else {
// Remove regular message
final allMessages = [...messages];
@@ -253,6 +253,7 @@ abstract class ChatPersistenceClient {
users.addAll([
channel.createdBy,
...messages.map((it) => it.user),
...reads.map((it) => it.user),
...members.map((it) => it.user),
...reactions.map((it) => it.user),