mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
fix nasty bug when updating contact flags
This commit is contained in:
parent
cda44ae0a0
commit
01471c0d24
2 changed files with 4 additions and 4 deletions
|
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "meshcore"
|
||||
version = "2.2.28"
|
||||
version = "2.2.29"
|
||||
authors = [
|
||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||
{ name="Alex Wolden", email="awolden@gmail.com" },
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ class ContactCommands(CommandHandlerBase):
|
|||
logger.debug(f"Setting {contact['adv_name']} path to {out_path_hex} with mode {out_path_hash_mode}")
|
||||
|
||||
# reflect the change
|
||||
contact["out_path_hash_mode"] = path_hash_mode
|
||||
contact["out_path_hash_mode"] = out_path_hash_mode
|
||||
contact["out_path"] = out_path_hex
|
||||
contact["out_path_len"] = out_path_len
|
||||
|
||||
|
|
@ -142,7 +142,7 @@ class ContactCommands(CommandHandlerBase):
|
|||
if out_path_len == -1: # path did not change and contact was flood
|
||||
out_path_len = 255 # we are signed
|
||||
else:
|
||||
out_path_len = out_path_len | (path_hash_mode << 6)
|
||||
out_path_len = out_path_len | (out_path_hash_mode << 6)
|
||||
|
||||
if flags is None:
|
||||
flags = contact["flags"]
|
||||
|
|
@ -170,7 +170,7 @@ class ContactCommands(CommandHandlerBase):
|
|||
return await self.update_contact(contact)
|
||||
|
||||
async def change_contact_path(self, contact, path, path_hash_mode=None) -> Event:
|
||||
return await self.update_contact(contact, path, path_hash_mode)
|
||||
return await self.update_contact(contact, path, path_hash_mode=path_hash_mode)
|
||||
|
||||
async def change_contact_flags(self, contact, flags) -> Event:
|
||||
return await self.update_contact(contact, flags=flags)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue