fix(llc): pass includeUserDetailsInConnectCall to WS
This commit is contained in:
@@ -377,11 +377,10 @@ class StreamChatClient {
|
||||
_ws.connectionStatusStream.skip(1).listen(_connectionStatusHandler);
|
||||
|
||||
try {
|
||||
final event = await _ws.connect(includeUserDetailsInConnectCall
|
||||
? user
|
||||
: User(
|
||||
id: user.id,
|
||||
));
|
||||
final event = await _ws.connect(
|
||||
user,
|
||||
includeUserDetails: includeUserDetailsInConnectCall,
|
||||
);
|
||||
return user.merge(event.me);
|
||||
} catch (e, stk) {
|
||||
logger.severe('error connecting ws', e, stk);
|
||||
|
||||
@@ -179,7 +179,10 @@ class WebSocket with TimerHelper {
|
||||
bool _connectRequestInProgress = false;
|
||||
|
||||
/// Connect the WS using the parameters passed in the constructor
|
||||
Future<Event> connect(User user) async {
|
||||
Future<Event> connect(
|
||||
User user, {
|
||||
bool includeUserDetails = false,
|
||||
}) async {
|
||||
if (_connectRequestInProgress) {
|
||||
throw const StreamWebSocketError('''
|
||||
You've called connect twice,
|
||||
@@ -194,7 +197,9 @@ class WebSocket with TimerHelper {
|
||||
connectionCompleter = Completer<Event>();
|
||||
|
||||
try {
|
||||
final uri = await _buildUri();
|
||||
final uri = await _buildUri(
|
||||
includeUserDetails: includeUserDetails,
|
||||
);
|
||||
_initWebSocketChannel(uri);
|
||||
} catch (e, stk) {
|
||||
_onConnectionError(e, stk);
|
||||
|
||||
Reference in New Issue
Block a user