fix(backend): watch times stay in utc for naive telegram dates, webhook outbox survives a database hiccup at start

This commit is contained in:
hh committed 2026-10-19 02:57:27 +00:00
1 parent 2c56934133
commit 97ccfbbffd
3 files changed
+14 -5

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
from __future__ import annotations
from datetime import datetime, timedelta
from datetime import UTC, datetime, timedelta
from typing import TYPE_CHECKING, Any
from userbot.modules.watches import repository
@@ -159,7 +159,7 @@ class WatchCache:
if not watch_ids:
return
if status != "online":
self._last_seen[peer_id] = last_online or at
self._last_seen[peer_id] = (last_online or at).astimezone(UTC)
return
await self._guard(self._on_online(peer_id, at, watch_ids))