take into account * scope

This commit is contained in:
Florent de Lamotte 2025-11-06 11:56:22 +01:00
parent 5a5f97322d
commit 057051c8c3
2 changed files with 2 additions and 2 deletions

View file

@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "meshcore"
version = "2.1.20"
version = "2.1.21"
authors = [
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
{ name="Alex Wolden", email="awolden@gmail.com" },

View file

@ -216,7 +216,7 @@ class MessagingCommands(CommandHandlerBase):
if scope.startswith("#"): # an hash
logger.debug(f"Setting scope from hash {scope}")
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
else: # assume the key has been sent directly
scope_key = scope.encode("utf-8")