diff --git a/packages/stream_video/lib/src/stream_video.dart b/packages/stream_video/lib/src/stream_video.dart index 8bbb6af9..0aa2ca5e 100644 --- a/packages/stream_video/lib/src/stream_video.dart +++ b/packages/stream_video/lib/src/stream_video.dart @@ -644,6 +644,7 @@ class StreamVideo extends Disposable { return; } + unawaited(callToJoin.join()); onCallAccepted?.call(callToJoin); } diff --git a/packages/stream_video_push_notification/lib/src/stream_video_push_notification.dart b/packages/stream_video_push_notification/lib/src/stream_video_push_notification.dart index 66127a33..ab53266a 100644 --- a/packages/stream_video_push_notification/lib/src/stream_video_push_notification.dart +++ b/packages/stream_video_push_notification/lib/src/stream_video_push_notification.dart @@ -164,7 +164,6 @@ class StreamVideoPushNotificationManager implements PushNotificationManager { onCallEvent.whereType().listen( (_) { if (!client.isConnected) { - _wasWsConnected = client.isConnected; client.openConnection(); } @@ -179,12 +178,7 @@ class StreamVideoPushNotificationManager implements PushNotificationManager { onCallEvent.whereType().map((_) => null), onCallEvent.whereType().map((_) => null), ]).listen( - (_) { - if (_wasWsConnected == false) { - _wasWsConnected = null; - client.closeConnection(); - } - + (event) { _subscriptions.cancel(_idCallAccepted); _subscriptions.cancel(_idCallEnded); _subscriptions.cancel(_idCallRejected); @@ -203,7 +197,6 @@ class StreamVideoPushNotificationManager implements PushNotificationManager { late SharedPreferences _sharedPreferences; final _logger = taggedLogger(tag: 'SV:PNManager'); - bool? _wasWsConnected; final Subscriptions _subscriptions = Subscriptions();