Fixed identity not known bug

This commit is contained in:
SebastianObi
2025-03-19 20:04:05 +01:00
parent 1be6b9e0ac
commit 6ec952832a
10 changed files with 90 additions and 0 deletions

View File

@@ -388,6 +388,15 @@ class LXMFPeer:
method = self.method
destination_identity = RNS.Identity.recall(destination)
if not destination_identity:
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
RNS.Transport.request_path(destination)
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
while not RNS.Transport.has_path(destination):
if time.time() > pr_time+30:
log("LXMF - Path request timeout", LOG_DEBUG)
return None
destination_identity = RNS.Identity.recall(destination)
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)

View File

@@ -382,6 +382,15 @@ class LXMFPeer:
method = self.method
destination_identity = RNS.Identity.recall(destination)
if not destination_identity:
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
RNS.Transport.request_path(destination)
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
while not RNS.Transport.has_path(destination):
if time.time() > pr_time+30:
log("LXMF - Path request timeout", LOG_DEBUG)
return None
destination_identity = RNS.Identity.recall(destination)
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)

View File

@@ -380,6 +380,15 @@ class LXMFPeer:
method = self.method
destination_identity = RNS.Identity.recall(destination)
if not destination_identity:
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
RNS.Transport.request_path(destination)
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
while not RNS.Transport.has_path(destination):
if time.time() > pr_time+30:
log("LXMF - Path request timeout", LOG_DEBUG)
return None
destination_identity = RNS.Identity.recall(destination)
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)

View File

@@ -378,6 +378,15 @@ class LXMFPeer:
method = self.method
destination_identity = RNS.Identity.recall(destination)
if not destination_identity:
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
RNS.Transport.request_path(destination)
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
while not RNS.Transport.has_path(destination):
if time.time() > pr_time+30:
log("LXMF - Path request timeout", LOG_DEBUG)
return None
destination_identity = RNS.Identity.recall(destination)
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)

View File

@@ -389,6 +389,15 @@ class LXMFPeer:
method = self.method
destination_identity = RNS.Identity.recall(destination)
if not destination_identity:
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
RNS.Transport.request_path(destination)
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
while not RNS.Transport.has_path(destination):
if time.time() > pr_time+30:
log("LXMF - Path request timeout", LOG_DEBUG)
return None
destination_identity = RNS.Identity.recall(destination)
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)

View File

@@ -376,6 +376,15 @@ class LXMFPeer:
method = self.method
destination_identity = RNS.Identity.recall(destination)
if not destination_identity:
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
RNS.Transport.request_path(destination)
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
while not RNS.Transport.has_path(destination):
if time.time() > pr_time+30:
log("LXMF - Path request timeout", LOG_DEBUG)
return None
destination_identity = RNS.Identity.recall(destination)
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)

View File

@@ -375,6 +375,15 @@ class LXMFPeer:
method = self.method
destination_identity = RNS.Identity.recall(destination)
if not destination_identity:
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
RNS.Transport.request_path(destination)
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
while not RNS.Transport.has_path(destination):
if time.time() > pr_time+30:
log("LXMF - Path request timeout", LOG_DEBUG)
return None
destination_identity = RNS.Identity.recall(destination)
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)

View File

@@ -385,6 +385,15 @@ class LXMFPeer:
method = self.method
destination_identity = RNS.Identity.recall(destination)
if not destination_identity:
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
RNS.Transport.request_path(destination)
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
while not RNS.Transport.has_path(destination):
if time.time() > pr_time+30:
log("LXMF - Path request timeout", LOG_DEBUG)
return None
destination_identity = RNS.Identity.recall(destination)
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)

View File

@@ -319,6 +319,15 @@ class LXMFPeer:
method = self.method
destination_identity = RNS.Identity.recall(destination)
if not destination_identity:
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
RNS.Transport.request_path(destination)
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
while not RNS.Transport.has_path(destination):
if time.time() > pr_time+30:
log("LXMF - Path request timeout", LOG_DEBUG)
return None
destination_identity = RNS.Identity.recall(destination)
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)

View File

@@ -375,6 +375,15 @@ class LXMFPeer:
method = self.method
destination_identity = RNS.Identity.recall(destination)
if not destination_identity:
log("LXMF - No keys known for destination. Requesting path", LOG_DEBUG)
RNS.Transport.request_path(destination)
pr_time = time.time()+RNS.Transport.first_hop_timeout(destination)
while not RNS.Transport.has_path(destination):
if time.time() > pr_time+30:
log("LXMF - Path request timeout", LOG_DEBUG)
return None
destination_identity = RNS.Identity.recall(destination)
destination = RNS.Destination(destination_identity, RNS.Destination.OUT, RNS.Destination.SINGLE, destination_name, destination_type)
return self.send_message(destination, self.destination, content, title, fields, timestamp, app_data, method)