Implemented identity queries and indication for unknown message originators

This commit is contained in:
Mark Qvist 2021-05-14 22:12:42 +02:00
parent 9a0c4ea6a8
commit 420cfcbbe3
3 changed files with 73 additions and 12 deletions

View file

@ -9,6 +9,13 @@ class Conversation:
cached_conversations = {}
created_callback = None
@staticmethod
def query_for_peer(source_hash):
try:
RNS.Transport.requestPath(bytes.fromhex(source_hash))
except Exception as e:
RNS.log("Error while querying network for peer identity. The contained exception was: "+str(e), RNS.LOG_ERROR)
@staticmethod
def ingest(lxmessage, app, originator = False, delegate = None):
if originator:
@ -147,7 +154,7 @@ class Conversation:
return True
else:
RNS.log("Path to destination is not known, cannot create LXMF Message.", RNS.LOG_VERBOSE)
RNS.log("Destination is not known, cannot create LXMF Message.", RNS.LOG_VERBOSE)
return False
def message_notification(self, message):