True when the session row represents a server-side slot the caller is * holding (queued, active, or in the post-expiry grace window with a live * instance id). DELETE only matters in those states; otherwise we'd fire a * spurious request the server has nothing to act on.
(current: FreebuffSessionResponse | null)
| 208 | * instance id). DELETE only matters in those states; otherwise we'd fire a |
| 209 | * spurious request the server has nothing to act on. */ |
| 210 | function shouldReleaseSlot(current: FreebuffSessionResponse | null): boolean { |
| 211 | if (!current) return false |
| 212 | return ( |
| 213 | current.status === 'queued' || |
| 214 | current.status === 'active' || |
| 215 | (current.status === 'ended' && Boolean(current.instanceId)) |
| 216 | ) |
| 217 | } |
| 218 | |
| 219 | function toLandingSession( |
| 220 | current: FreebuffSessionResponse | null, |
no outgoing calls
no test coverage detected