This commit is contained in:
Timothy Jaeryang Baek committed 2026-02-02 08:55:13 -06:00
1 parent b2c2f1bd49
commit c22bb4f853
2 files changed
+36 -6

No files matched your search

@@ -124,6 +124,13 @@ def upgrade() -> None:
timestamp = message.get("timestamp", now)
# Normalize timestamp: convert ms to seconds, validate range
if timestamp > 10_000_000_000:
timestamp = timestamp // 1000
# Must be after 2020 and not too far in the future
if timestamp < 1577836800 or timestamp > now + 86400:
timestamp = now
try:
conn.execute(
sa.insert(chat_message_table).values(