diff --git a/pyproject.toml b/pyproject.toml index 3f9c70c..8dcb54d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "meshcore" -version = "2.3.2" +version = "2.3.3" authors = [ { name="Florent de Lamotte", email="florent@frizoncorrea.fr" }, { name="Alex Wolden", email="awolden@gmail.com" }, diff --git a/src/meshcore/commands/messaging.py b/src/meshcore/commands/messaging.py index 29bded0..1150e6c 100644 --- a/src/meshcore/commands/messaging.py +++ b/src/meshcore/commands/messaging.py @@ -269,6 +269,8 @@ class MessagingCommands(CommandHandlerBase): scope_key = b"\0"*16 else: logger.debug(f"Setting scope from string {scope}") + if scope[0] != "#": # no hashtag as first char + scope = "#" + scope # adding hashtag scope_key = sha256(scope.encode("utf-8")).digest()[0:16] elif isinstance (scope, bytes): # scope has been sent directly as byte logger.debug(f"Directly setting scope to {scope}")