()
| 24 | const DEFAULT_CLEANUP_PERIOD_DAYS = 30 |
| 25 | |
| 26 | function getCutoffDate(): Date { |
| 27 | const settings = getSettings_DEPRECATED() || {} |
| 28 | const cleanupPeriodDays = |
| 29 | settings.cleanupPeriodDays ?? DEFAULT_CLEANUP_PERIOD_DAYS |
| 30 | const cleanupPeriodMs = cleanupPeriodDays * 24 * 60 * 60 * 1000 |
| 31 | return new Date(Date.now() - cleanupPeriodMs) |
| 32 | } |
| 33 | |
| 34 | export type CleanupResult = { |
| 35 | messages: number |
no outgoing calls
no test coverage detected