Fixed
- FloodWaitError no longer crashes
get_dialogs()orget_me()— PR #124 setflood_sleep_threshold=0globally but only wrapped 2 of ~20 API call sites. The unwrappedget_dialogs()andget_me()calls could crash the entire backup or prevent startup. Both are now wrapped with bounded flood-wait retry logic. - Negative
e.secondsfrom Telegram no longer causes zero-delay retry storms — Sleep duration is now clamped tomax(0, ...)on both the iterator wrapper and the new one-shot retry helper. - Invalid
FLOOD_WAIT_LOG_THRESHOLDenv var no longer crashes mid-backup — Bareint()parsing replaced with defensivetry/exceptthat falls back to the default of 10 seconds. iter_messages_with_flood_retrynow rejectsreverse=False— The resume tracking (max(resume_from, msg.id)) is only correct for ascending iteration. AValueErroris now raised ifreverse=Trueis not passed, preventing silent data corruption from future misuse.- Documented
FLOOD_WAIT_LOG_THRESHOLD— Added to.env.examplealongside the other logging variables.
📋 Full changelog: docs/CHANGELOG.md