fix(llc): when removing current user from channel check for null in the callback

Closes #1753
This commit is contained in:
Efthymis Sarmpanis
2023-11-24 13:46:22 +02:00
parent 3b1be70b10
commit 0d7559e3d8
5 changed files with 103 additions and 1 deletions
+2
View File
@@ -6,6 +6,8 @@
update message with `type: reply`.
- [[#1724]](https://github.com/GetStream/stream-chat-flutter/issues/1724) Fixed sendFile error
on `AttachmentFile` with `bytes` and no `name`.
- [[#1753]](https://github.com/GetStream/stream-chat-flutter/issues/1753) Fixed Unhandled null
check operator exception when user is removed from a channel.
## 6.8.0
@@ -1658,7 +1658,7 @@ class ClientState {
)
.listen((event) async {
final isCurrentUser = event.user!.id == currentUser!.id;
if (isCurrentUser) {
if (isCurrentUser && event.channel != null) {
final eventChannel = event.channel!;
await _client.chatPersistenceClient
?.deleteChannels([eventChannel.cid]);