Skip to content

Commit f3f9d28

Browse files
committed
initial support for scope
1 parent d95b7bf commit f3f9d28

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/meshcore_cli/meshcore_cli.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ async def log_message(mc, msg):
328328
if msg["type"] == "PRIV" :
329329
ct = mc.get_contact_by_key_prefix(msg['pubkey_prefix'])
330330
if ct is None:
331-
msg["name"] = data["pubkey_prefix"]
331+
msg["name"] = msg["pubkey_prefix"]
332332
else:
333333
msg["name"] = ct["adv_name"]
334334
elif msg["type"] == "CHAN" :
@@ -2108,6 +2108,12 @@ async def next_cmd(mc, cmds, json_output=False):
21082108
if res is None:
21092109
print("Error setting channel")
21102110

2111+
case "scope":
2112+
argnum = 1
2113+
res = await mc.commands.set_flood_scope(cmds[1])
2114+
if res is None or res.type == EventType.ERROR:
2115+
print(f"Error while setting scope")
2116+
21112117
case "remove_channel":
21122118
argnum = 1
21132119
res = await set_channel(mc, cmds[1], "", bytes.fromhex(16*"00"))

0 commit comments

Comments
 (0)