fix: Open notification for invite crashes app

pull/754/head
krille-chan 2 years ago
parent e70ecfcf04
commit 8f66cad58b
No known key found for this signature in database

@ -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);
}

Loading…
Cancel
Save