(row: InternalSessionRow)
| 1 | import type { InternalSessionRow, SessionStateResponse } from './types' |
| 2 | |
| 3 | function limitedModeReasonFromRow(row: InternalSessionRow) { |
| 4 | if ((row.access_tier ?? 'full') !== 'limited') return {} |
| 5 | return { |
| 6 | countryCode: row.country_code ?? null, |
| 7 | countryBlockReason: row.country_block_reason ?? null, |
| 8 | ipPrivacySignals: row.ip_privacy_signals ?? null, |
| 9 | } |
| 10 | } |
| 11 | |
| 12 | /** |
| 13 | * Pure function converting an internal session row (or absence thereof) into |
no outgoing calls
no test coverage detected