From f3f9d28d530905edfa2b587ad4f1c915d96d731b Mon Sep 17 00:00:00 2001 From: Florent de Lamotte Date: Wed, 5 Nov 2025 16:33:02 +0100 Subject: [PATCH] initial support for scope --- src/meshcore_cli/meshcore_cli.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/meshcore_cli/meshcore_cli.py b/src/meshcore_cli/meshcore_cli.py index 0e8ce22..bb23997 100644 --- a/src/meshcore_cli/meshcore_cli.py +++ b/src/meshcore_cli/meshcore_cli.py @@ -328,7 +328,7 @@ async def log_message(mc, msg): if msg["type"] == "PRIV" : ct = mc.get_contact_by_key_prefix(msg['pubkey_prefix']) if ct is None: - msg["name"] = data["pubkey_prefix"] + msg["name"] = msg["pubkey_prefix"] else: msg["name"] = ct["adv_name"] elif msg["type"] == "CHAN" : @@ -2108,6 +2108,12 @@ async def next_cmd(mc, cmds, json_output=False): if res is None: print("Error setting channel") + case "scope": + argnum = 1 + res = await mc.commands.set_flood_scope(cmds[1]) + if res is None or res.type == EventType.ERROR: + print(f"Error while setting scope") + case "remove_channel": argnum = 1 res = await set_channel(mc, cmds[1], "", bytes.fromhex(16*"00"))