fix(telegram): harden flood fallback recovery

Keep empty-tail recovery scoped to the current stream segment and bound fallback flood retries. Preserve Telegram's server retry hint without blocking final delivery through a long cooldown.
This commit is contained in:
kshitijk4poor 2026-07-11 10:56:57 +05:30 committed by kshitij
parent 04898631cb
commit 4aa499ff9f
3 changed files with 113 additions and 16 deletions

View file

@ -4075,7 +4075,11 @@ class TelegramAdapter(BasePlatformAdapter):
self.name, wait,
)
if wait > 5.0:
return SendResult(success=False, error=f"flood_control:{wait}")
return SendResult(
success=False,
error=f"flood_control:{wait}",
retry_after=float(wait),
)
await asyncio.sleep(wait)
try:
await self._bot.edit_message_text(