From 3fbe2e94da2c348b2cc9e44803f72275d891397d Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Tue, 19 Mar 2024 09:47:37 +0100 Subject: [PATCH] Append incoming to locally delivered transient IDs and check on arrival --- LXMF/LXMRouter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/LXMF/LXMRouter.py b/LXMF/LXMRouter.py index 991a893..f249b0c 100644 --- a/LXMF/LXMRouter.py +++ b/LXMF/LXMRouter.py @@ -953,6 +953,12 @@ class LXMRouter: RNS.log(str(self)+" ignored message from "+RNS.prettyhexrep(message.source_hash), RNS.LOG_DEBUG) return False + if self.has_message(message.hash): + RNS.log(str(self)+" ignored already received message from "+RNS.prettyhexrep(message.source_hash), RNS.LOG_DEBUG) + return False + else: + self.locally_delivered_transient_ids[message.hash] = time.time() + if self.__delivery_callback != None and callable(self.__delivery_callback): try: self.__delivery_callback(message)