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
This commit is contained in:
td 2023-04-29 19:47:13 +05:30
parent 1a58a8ec09
commit 444ba47022
No known key found for this signature in database
GPG Key ID: F6D9E9BF14C7D103
1 changed files with 2 additions and 0 deletions

View File

@ -86,6 +86,8 @@ extension GroupCallUtils on Room {
Future<void> singleShotStaleCallCheckerOnRoom() async { Future<void> singleShotStaleCallCheckerOnRoom() async {
Logs().d('checking for stale group calls in room $id'); 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 = final copyGroupCallIds =
states.tryGetMap<String, Event>(EventTypes.GroupCallPrefix); states.tryGetMap<String, Event>(EventTypes.GroupCallPrefix);
if (copyGroupCallIds == null) return; if (copyGroupCallIds == null) return;