fix(llc): update currentUser after successful connection

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2021-07-27 20:23:28 +05:30
committed by xsahil03x
parent 39449e5700
commit f6cf835b4e
2 changed files with 4 additions and 8 deletions
@@ -325,8 +325,8 @@ class StreamChatClient {
_chatPersistenceClient = _originalChatPersistenceClient;
await _chatPersistenceClient!.connect(ownUser.id);
}
final res = await openConnection();
return res;
final connectedUser = await openConnection();
return state.currentUser = connectedUser;
} catch (e, stk) {
if (e is StreamWebSocketError && e.isRetriable) {
final event = await _chatPersistenceClient?.getConnectionInfo();