This commit is contained in:
@@ -20,15 +20,13 @@ export function successfulStatusFields(
|
||||
};
|
||||
}
|
||||
|
||||
/** Occupancy timers and match clearing follow the same source as the UI. */
|
||||
/** Occupancy follows the UI's source; only gameplay evidence changes match timing. */
|
||||
export function activityFields(current: ServerRow, status: ServerObservation): Partial<ServerRow> {
|
||||
if (status.health !== 'online' || status.last_players === null) return {};
|
||||
return status.last_players > 0
|
||||
? { active_since: current.active_since ?? status.last_seen_at, inactive_since: null }
|
||||
: {
|
||||
active_since: null,
|
||||
inactive_since: current.inactive_since ?? status.last_seen_at,
|
||||
game_started_at: null,
|
||||
game_ended_at: null
|
||||
inactive_since: current.inactive_since ?? status.last_seen_at
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user