From 444ba4702255ef0b0041fa3499850517eddc31b5 Mon Sep 17 00:00:00 2001 From: td Date: Sat, 29 Apr 2023 19:47:13 +0530 Subject: [PATCH] chore: oneShotSync before staleCallChecker fix: while singleShotStaleCallChecker code seems to be correct we are seeings some random disconnects in group calls, this makes sure we have all the to-device messages we are supposed to have before checking for stale calls --- lib/src/voip/voip_room_extension.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/voip/voip_room_extension.dart b/lib/src/voip/voip_room_extension.dart index 5eebddcd..1bc0a8de 100644 --- a/lib/src/voip/voip_room_extension.dart +++ b/lib/src/voip/voip_room_extension.dart @@ -86,6 +86,8 @@ extension GroupCallUtils on Room { Future singleShotStaleCallCheckerOnRoom() async { Logs().d('checking for stale group calls in room $id'); + // make sure we have all the to-device messages we are supposed to have + await client.oneShotSync(); final copyGroupCallIds = states.tryGetMap(EventTypes.GroupCallPrefix); if (copyGroupCallIds == null) return;