fix: Wait for room invite before open in pushhelper

This commit is contained in:
krille-chan 2024-10-19 08:15:32 +02:00
parent d1e211adee
commit 0301c83f40
No known key found for this signature in database

View file

@ -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'