Skip to content

Commit

Permalink
fix(llc): fixed user parsing leading to incorrect online presence (#1981
Browse files Browse the repository at this point in the history
)

* fixed user parsing leading to incorrect online presence

* changelog entry

* Update packages/stream_chat/CHANGELOG.md
  • Loading branch information
deven98 authored Jul 16, 2024
1 parent f05bae7 commit a621277
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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

🐞 Fixed

- Fixed incorrect user object and online presence when user is updated.

## 7.3.0

🔄 Changed
Expand Down
2 changes: 1 addition & 1 deletion packages/stream_chat/lib/src/client/client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1633,7 +1633,7 @@ class ClientState {
_eventsSubscription?.add(
_client.on(EventType.userUpdated).listen((event) {
if (event.user!.id == currentUser!.id) {
currentUser = OwnUser.fromJson(event.user!.toJson());
currentUser = OwnUser.fromUser(event.user!);
}
updateUser(event.user);
}),
Expand Down

0 comments on commit a621277

Please sign in to comment.