mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-11 11:56:18 +00:00
including public_key in PUSH_ADVERT and PUSH_PATH_UPDATE
This commit is contained in:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "meshcore"
|
name = "meshcore"
|
||||||
version = "1.9.10"
|
version = "1.9.11"
|
||||||
authors = [
|
authors = [
|
||||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||||
{ name="Alex Wolden", email="awolden@gmail.com" },
|
{ name="Alex Wolden", email="awolden@gmail.com" },
|
||||||
|
|||||||
@@ -239,13 +239,15 @@ class MessageReader:
|
|||||||
# Push notifications
|
# Push notifications
|
||||||
elif packet_type_value == PacketType.ADVERTISEMENT.value:
|
elif packet_type_value == PacketType.ADVERTISEMENT.value:
|
||||||
logger.debug("Advertisement received")
|
logger.debug("Advertisement received")
|
||||||
# TODO: Read advertisement attributes
|
res = {}
|
||||||
await self.dispatcher.dispatch(Event(EventType.ADVERTISEMENT, {}))
|
res["public_key"] = data[1:33].hex()
|
||||||
|
await self.dispatcher.dispatch(Event(EventType.ADVERTISEMENT, res, res))
|
||||||
|
|
||||||
elif packet_type_value == PacketType.PATH_UPDATE.value:
|
elif packet_type_value == PacketType.PATH_UPDATE.value:
|
||||||
logger.debug("Code path update")
|
logger.debug("Code path update")
|
||||||
# TODO: Read path update attributes
|
res = {}
|
||||||
await self.dispatcher.dispatch(Event(EventType.PATH_UPDATE, {}))
|
res["public_key"] = data[1:33].hex()
|
||||||
|
await self.dispatcher.dispatch(Event(EventType.PATH_UPDATE, res, res))
|
||||||
|
|
||||||
elif packet_type_value == PacketType.ACK.value:
|
elif packet_type_value == PacketType.ACK.value:
|
||||||
logger.debug("Received ACK")
|
logger.debug("Received ACK")
|
||||||
|
|||||||
Reference in New Issue
Block a user