diff --git a/src/eddn/core/DuplicateMessages.py b/src/eddn/core/DuplicateMessages.py index 06181c7..8dc2c4c 100644 --- a/src/eddn/core/DuplicateMessages.py +++ b/src/eddn/core/DuplicateMessages.py @@ -32,7 +32,7 @@ class DuplicateMessages(Thread): def isDuplicated(self, json): with self.lock: - # Test messages are not duplicate + # Test messages are never duplicate, would be a pain to wait for another test :D if re.search('test', json['$schemaRef'], re.I): return False @@ -50,6 +50,10 @@ class DuplicateMessages(Thread): if 'DistFromStarLS' in jsonTest['message']: jsonTest['message']['DistFromStarLS'] = int(jsonTest['message']['DistFromStarLS'] + 0.5) + # Remove journal timestamp (Mainly to avoid multiple scan messages and faction influences) + if 'timestamp' in jsonTest['message']: + del jsonTest['message']['timestamp'] + message = simplejson.dumps(jsonTest, sort_keys=True) # Ensure most duplicate messages will get the same key key = hashlib.sha256(message).hexdigest()