From 0301c83f4045d494a786d1fc42838a0a74ebd2ae Mon Sep 17 00:00:00 2001 From: krille-chan Date: Sat, 19 Oct 2024 08:15:32 +0200 Subject: [PATCH] fix: Wait for room invite before open in pushhelper --- lib/utils/background_push.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart index a7ce8c6de..1ba2659a6 100644 --- a/lib/utils/background_push.dart +++ b/lib/utils/background_push.dart @@ -328,6 +328,11 @@ class BackgroundPush { } await client.roomsLoading; await client.accountDataLoading; + if (client.getRoomById(roomId) == null) { + await client + .waitForRoomInSync(roomId) + .timeout(const Duration(seconds: 30)); + } FluffyChatApp.router.go( client.getRoomById(roomId)?.membership == Membership.invite ? '/rooms'