Skip to content

Commit

Permalink
Merge pull request #1041 from GetStream/feat/truncate
Browse files Browse the repository at this point in the history
feat(llc): Handle `event.message` in `channel.truncate` events
  • Loading branch information
imtoori authored Mar 24, 2022
2 parents 1cdef1a + 058e2b4 commit 2bde45e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/stream_chat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Upcoming

✅ Added

- Handle `event.message` in `channel.truncate` events

## 3.5.1

🐞 Fixed
Expand Down
3 changes: 3 additions & 0 deletions packages/stream_chat/lib/src/client/channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1612,6 +1612,9 @@ class ChannelClientState {
await _channel._client.chatPersistenceClient
?.deleteMessageByCid(channel.cid);
truncate();
if (event.message != null) {
updateMessage(event.message!);
}
}));
}

Expand Down

0 comments on commit 2bde45e

Please sign in to comment.