mirror of
https://github.com/ericasch6/scrum-poker-internal.git
synced 2026-10-15 07:46:08 +00:00
Handle authenticated room instance takeover
This commit is contained in:
@@ -42,6 +42,16 @@ export function useRoomRealtime(
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
payload.change === 'player_instance_replaced' &&
|
||||
payload.affected_player_id === currentPlayer.value.id &&
|
||||
payload.affected_instance_id === currentPlayer.value.instance_id
|
||||
) {
|
||||
router.visit(home().url, { replace: true });
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (payload.change === 'room_closed') {
|
||||
router.visit(
|
||||
join({ query: { join_code: room.value.join_code } }).url,
|
||||
|
||||
Reference in New Issue
Block a user