mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
including public_key in PUSH_ADVERT and PUSH_PATH_UPDATE
This commit is contained in:
parent
ac76e4f374
commit
5be498145a
2 changed files with 7 additions and 5 deletions
|
|
@ -239,13 +239,15 @@ class MessageReader:
|
|||
# Push notifications
|
||||
elif packet_type_value == PacketType.ADVERTISEMENT.value:
|
||||
logger.debug("Advertisement received")
|
||||
# TODO: Read advertisement attributes
|
||||
await self.dispatcher.dispatch(Event(EventType.ADVERTISEMENT, {}))
|
||||
res = {}
|
||||
res["public_key"] = data[1:33].hex()
|
||||
await self.dispatcher.dispatch(Event(EventType.ADVERTISEMENT, res, res))
|
||||
|
||||
elif packet_type_value == PacketType.PATH_UPDATE.value:
|
||||
logger.debug("Code path update")
|
||||
# TODO: Read path update attributes
|
||||
await self.dispatcher.dispatch(Event(EventType.PATH_UPDATE, {}))
|
||||
res = {}
|
||||
res["public_key"] = data[1:33].hex()
|
||||
await self.dispatcher.dispatch(Event(EventType.PATH_UPDATE, res, res))
|
||||
|
||||
elif packet_type_value == PacketType.ACK.value:
|
||||
logger.debug("Received ACK")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue