Give the digest window a way back

Deleting a message that Slack no longer has counts as done, so the window
rewinds instead of staying stuck. A reset button clears the mark by hand,
and the empty-run notice now says since the last dispatch instead of seven
days.
This commit is contained in:
Matthias G
2026-08-03 13:38:17 +02:00
parent 5ef9cd704e
commit 328db743d8
6 changed files with 56 additions and 15 deletions
+15
View File
@@ -187,3 +187,18 @@ export async function performDeleteMessage(viewer: Viewer, formData: FormData):
return { status: 'ok', message: 'messageDeleted' }
}
export async function performResetWindow(viewer: Viewer): Promise<AdminFormState> {
await clearSetting('slack.lastSentAt')
await recordAudit({
actorId: viewer.id,
actorLabel: viewer.email,
action: 'settings.reportReset',
entity: 'setting',
entityId: 'slack',
data: {},
})
return { status: 'ok', message: 'windowReset' }
}