mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-11 11:56:18 +00:00
take into account * scope
This commit is contained in:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "meshcore"
|
name = "meshcore"
|
||||||
version = "2.1.20"
|
version = "2.1.21"
|
||||||
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" },
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ class MessagingCommands(CommandHandlerBase):
|
|||||||
if scope.startswith("#"): # an hash
|
if scope.startswith("#"): # an hash
|
||||||
logger.debug(f"Setting scope from hash {scope}")
|
logger.debug(f"Setting scope from hash {scope}")
|
||||||
scope_key = sha256(scope.encode("utf-8")).digest()[0:16]
|
scope_key = sha256(scope.encode("utf-8")).digest()[0:16]
|
||||||
elif scope == "0" or scope == "None": # disable
|
elif scope == "0" or scope == "None" or scope == "*" or scope == "": # disable
|
||||||
scope_key = b"\0"*16
|
scope_key = b"\0"*16
|
||||||
else: # assume the key has been sent directly
|
else: # assume the key has been sent directly
|
||||||
scope_key = scope.encode("utf-8")
|
scope_key = scope.encode("utf-8")
|
||||||
|
|||||||
Reference in New Issue
Block a user