mirror of
https://github.com/markqvist/LXMF.git
synced 2025-03-15 03:26:31 -04:00
General structure for LXMF propagation
This commit is contained in:
parent
ad773dcbc5
commit
734305e9c7
10
LXMF/LXMF.py
10
LXMF/LXMF.py
@ -499,7 +499,7 @@ class LXMFPropagationAnnounceHandler:
|
||||
|
||||
|
||||
class LXMPeer:
|
||||
OFFER_REQUEST_PATH = "o"
|
||||
OFFER_REQUEST_PATH = "/offer"
|
||||
|
||||
IDLE = 0x00
|
||||
LINK_ESTABLISHING = 0x01
|
||||
@ -861,7 +861,13 @@ class LXMRouter:
|
||||
# TODO: The peer this was received from should
|
||||
# have the transient id added to it's list of
|
||||
# already handled messages.
|
||||
self.lxmf_propagation(resource.data.read())
|
||||
try:
|
||||
messages = msgpack.unpackb(resource.data.read())
|
||||
for message in messages:
|
||||
self.lxmf_propagation(lxmessage)
|
||||
|
||||
except Exception as e:
|
||||
RNS.log("Error while unpacking received propagation messages", RNS.LOG_DEBUG)
|
||||
|
||||
|
||||
def lxmf_propagation(self, lxmf_data):
|
||||
|
Loading…
x
Reference in New Issue
Block a user