fix: Open notification for invite crashes app

This commit is contained in:
krille-chan 2023-12-27 16:30:47 +01:00
parent e70ecfcf04
commit 8f66cad58b
No known key found for this signature in database

View file

@ -313,7 +313,11 @@ class BackgroundPush {
}
await client.roomsLoading;
await client.accountDataLoading;
FluffyChatApp.router.go('/rooms/$roomId');
FluffyChatApp.router.go(
client.getRoomById(roomId)?.membership == Membership.invite
? '/rooms'
: '/rooms/$roomId',
);
} catch (e, s) {
Logs().e('[Push] Failed to open room', e, s);
}