From c879caa9d7f451a42309bce2b0c3cc85e5fcf5a3 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Wed, 28 Oct 2020 22:46:22 +0000 Subject: [PATCH] Add checks in dedup for time-less messages --- utils/dedup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/dedup.py b/utils/dedup.py index 3545e68..a5c3c45 100644 --- a/utils/dedup.py +++ b/utils/dedup.py @@ -7,7 +7,8 @@ from utils.logging.debug import debug def dedup(numName, b): c = deepcopy(b) - del c["time"] + if "time" in c.keys(): + del c["time"] c["approxtime"] = str(datetime.utcnow().timestamp())[:main.config["Tweaks"]["DedupPrecision"]] castHash = siphash24(main.hashKey, dumps(c, sort_keys=True).encode("utf-8")) del c["approxtime"]