fix(telegram,conversations): attachments by day with sweep in both modes, merge renames the topic, gone topics unbind, failures visible

This commit is contained in:
hh
2026-09-01 23:13:22 +02:00
parent 61b5bda31a
commit 253bde1b11
3 changed files with 422 additions and 28 deletions
@@ -143,7 +143,7 @@ class Outbox:
if "parse" in text and not row.plain:
await self._retry(row, str(exc), delay=0.0, plain=True)
elif any(marker in text for marker in _GONE):
await self._fail(row, str(exc))
await self._fail(row, str(exc), gone=True)
else:
await self._fail(row, str(exc))
except (TelegramNotFound, TelegramForbiddenError) as exc:
@@ -180,7 +180,7 @@ class Outbox:
if delay < 5.0:
self._wake.set()
async def _fail(self, row: Delivery, error: str) -> None:
async def _fail(self, row: Delivery, error: str, *, gone: bool = False) -> None:
_log.error(
"delivery #%s to %s/%s given up: %s",
row.id,
@@ -196,6 +196,7 @@ class Outbox:
chat_id=row.chat_id,
thread_id=row.thread_id,
error=error,
gone=gone,
)
async def _mark(