diff --git a/LXMF/Handlers.py b/LXMF/Handlers.py index 32e045e..571a59f 100644 --- a/LXMF/Handlers.py +++ b/LXMF/Handlers.py @@ -34,11 +34,17 @@ class LXMFPropagationAnnounceHandler: data = msgpack.unpackb(app_data) if self.lxmrouter.propagation_node and self.lxmrouter.autopeer: + node_timebase = data[1] + propagation_transfer_limit = None + if len(data) >= 3: + propagation_transfer_limit = data[2] + if data[0] == True: if RNS.Transport.hops_to(destination_hash) <= self.lxmrouter.autopeer_maxdepth: - self.lxmrouter.peer(destination_hash, data[1]) + self.lxmrouter.peer(destination_hash, node_timebase, propagation_transfer_limit) + elif data[0] == False: - self.lxmrouter.unpeer(destination_hash, data[1]) + self.lxmrouter.unpeer(destination_hash, node_timebase) except Exception as e: RNS.log("Error while evaluating propagation node announce, ignoring announce.", RNS.LOG_DEBUG)