Deleting a digest makes it sendable again

The dispatch timestamp survived the deletion, so removing a message in Slack
left the digest permanently swallowed. Deleting now rewinds the window to the
newest digest that still stands.
This commit is contained in:
Matthias G
2026-08-03 13:32:01 +02:00
parent c1cfd41ad3
commit 5ef9cd704e
3 changed files with 58 additions and 3 deletions
+9
View File
@@ -1,6 +1,7 @@
import { recordAudit } from '~/data/repositories/audit'
import {
clearSetting,
findLatestSentRun,
findReportRun,
markReportRunDeleted,
readSettings,
@@ -167,6 +168,14 @@ export async function performDeleteMessage(viewer: Viewer, formData: FormData):
await markReportRunDeleted(run.id)
const previous = await findLatestSentRun()
if (previous) {
await writeSetting('slack.lastSentAt', previous.toAt.toISOString())
} else {
await clearSetting('slack.lastSentAt')
}
await recordAudit({
actorId: viewer.id,
actorLabel: viewer.email,