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
|
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "meshcore"
|
||||
version = "1.9.10"
|
||||
version = "1.9.11"
|
||||
authors = [
|
||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||
{ name="Alex Wolden", email="awolden@gmail.com" },
|
||||
|
|
|
|||
|
|
@ -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