From dd5502b968e65c1ff046dfc0674ccda10a337902 Mon Sep 17 00:00:00 2001 From: Florent Date: Tue, 25 Aug 2026 15:25:13 -0400 Subject: [PATCH] fix issue when sending a cli cmd to room or sensor --- pyproject.toml | 2 +- src/meshcore/commands/messaging.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7c41201..1a8872e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "meshcore" -version = "2.3.9" +version = "2.3.9.1" 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 ce1cd99..c678e80 100644 --- a/src/meshcore/commands/messaging.py +++ b/src/meshcore/commands/messaging.py @@ -78,10 +78,10 @@ class MessagingCommands(CommandHandlerBase): dst_type = AdvType.REPEATER.value cmd_data = bytearray([CommandType.SEND_TXT_MSG.value]) - if dst_type == AdvType.REPEATER.value : - cmd_data.append(TxtType.CLI_DATA.value) - else: + if dst_type == AdvType.CHAT.value : cmd_data.append(TxtType.CLI_CMD.value) + else: + cmd_data.append(TxtType.CLI_DATA.value) cmd_data.append(0) # first and only attempt cmd_data.extend(timestamp.to_bytes(4, "little")) cmd_data.extend(dst_bytes)