We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd2dffb commit a6a3a72Copy full SHA for a6a3a72
packages/stream_video/lib/src/stream_video.dart
@@ -251,6 +251,12 @@ class StreamVideo {
251
252
/// Connects the user to the Stream Video service.
253
Future<Result<UserToken>> connect() async {
254
+ if (currentUserType == UserType.anonymous) {
255
+ _logger.w(() => '[connect] rejected (anonymous user)');
256
+ return Result.error(
257
+ 'Cannot connect anonymous user to the WS due to Missing Permissions',
258
+ );
259
+ }
260
_connectOperation ??= _connect().asCancelable();
261
return _connectOperation!
262
.valueOrDefault(Result.error('connect was cancelled'))
0 commit comments