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:
@@ -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' }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user