Reset channel resume points on undo
--undo only cleared the reactions log, so a subsequent run kept diffing forward from each channel's last-seen message instead of honoring days_back, silently skipping everything already undone. Undo now also clears channel_scan_state so the next run does a full fresh backlog scan.
This commit is contained in:
@@ -43,4 +43,9 @@ async def undo_all_reactions(client: discord.Client, storage: Storage, display:
|
||||
|
||||
await asyncio.sleep(human_jitter())
|
||||
|
||||
log.info("Undo complete: removed %d/%d reaction(s)", removed, total)
|
||||
cleared = await asyncio.to_thread(storage.clear_scan_state)
|
||||
log.info(
|
||||
"Undo complete: removed %d/%d reaction(s), cleared %d channel resume point(s) — "
|
||||
"the next normal run will do a full fresh backlog scan.",
|
||||
removed, total, cleared,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user