(row: { banned: boolean | null; banExpires: Date | null })
| 7 | * semantics: a ban whose `banExpires` is in the past is treated as lifted. |
| 8 | */ |
| 9 | export function isBanActive(row: { banned: boolean | null; banExpires: Date | null }): boolean { |
| 10 | if (!row.banned) return false |
| 11 | if (row.banExpires && row.banExpires.getTime() <= Date.now()) return false |
| 12 | return true |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * True when a raw email (e.g. an inbound sender) is blocked: it is in the |
no outgoing calls
no test coverage detected