From 8801453bbc05f42640c8e8e7b51e1cf7b1dbb3a1 Mon Sep 17 00:00:00 2001 From: Florent Date: Tue, 18 Nov 2025 21:42:05 +0100 Subject: [PATCH] let user send msg to prefix > 12 chars --- src/meshcore_cli/meshcore_cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/meshcore_cli/meshcore_cli.py b/src/meshcore_cli/meshcore_cli.py index 7311985..fc0089d 100644 --- a/src/meshcore_cli/meshcore_cli.py +++ b/src/meshcore_cli/meshcore_cli.py @@ -1494,7 +1494,8 @@ async def send_msg (mc, contact, msg) : return res async def msg_ack (mc, contact, msg) : - timeout = 0 if not 'timeout' in contact else contact['timeout'] + timeout = 0 if not isinstance(contact, dict) or not 'timeout' in contact\ + else contact['timeout'] res = await mc.commands.send_msg_with_retry(contact, msg, max_attempts=msg_ack.max_attempts, flood_after=msg_ack.flood_after, @@ -2334,7 +2335,7 @@ async def next_cmd(mc, cmds, json_output=False): argnum = 2 dest = None - if len(cmds[1]) == 12: # possibly an hex prefix + if len(cmds[1]) >= 12: # possibly an hex prefix try: dest = bytes.fromhex(cmds[1]) except ValueError: