Add checks in dedup for time-less messages
This commit is contained in:
parent
db7e5677d3
commit
c879caa9d7
|
@ -7,7 +7,8 @@ from utils.logging.debug import debug
|
||||||
|
|
||||||
def dedup(numName, b):
|
def dedup(numName, b):
|
||||||
c = deepcopy(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"]]
|
c["approxtime"] = str(datetime.utcnow().timestamp())[:main.config["Tweaks"]["DedupPrecision"]]
|
||||||
castHash = siphash24(main.hashKey, dumps(c, sort_keys=True).encode("utf-8"))
|
castHash = siphash24(main.hashKey, dumps(c, sort_keys=True).encode("utf-8"))
|
||||||
del c["approxtime"]
|
del c["approxtime"]
|
||||||
|
|
Loading…
Reference in New Issue