Add deduplication precision toggle, fix printing odd characters and implement sending messages to all instances of a certain network, or all networks associated with a certain alias
This commit is contained in:
@@ -6,7 +6,7 @@ from utils.logging.debug import debug
|
||||
|
||||
def dedup(numName, c):
|
||||
# deduplication
|
||||
c["approxtime"] = int(datetime.utcnow().timestamp())
|
||||
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"]
|
||||
isDuplicate= any(castHash in main.lastEvents[x] for x in main.lastEvents.keys() if not x == numName)
|
||||
|
||||
Reference in New Issue
Block a user