refac
Co-Authored-By: Nil Puig <244631886+npuigm@users.noreply.github.com>
This commit is contained in:
co-authored by
Nil Puig
parent
40d90286b6
commit
499ca282e5
@@ -127,6 +127,11 @@ def upgrade() -> None:
|
|||||||
|
|
||||||
timestamp = message.get("timestamp", now)
|
timestamp = message.get("timestamp", now)
|
||||||
|
|
||||||
|
try:
|
||||||
|
timestamp = int(float(timestamp))
|
||||||
|
except Exception as e:
|
||||||
|
timestamp = now
|
||||||
|
|
||||||
# Normalize timestamp: convert ms to seconds, validate range
|
# Normalize timestamp: convert ms to seconds, validate range
|
||||||
if timestamp > 10_000_000_000:
|
if timestamp > 10_000_000_000:
|
||||||
timestamp = timestamp // 1000
|
timestamp = timestamp // 1000
|
||||||
|
|||||||
Reference in New Issue
Block a user