mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
fixed sending msg to channel with name
This commit is contained in:
parent
d12241b1dd
commit
1227d417cf
1 changed files with 3 additions and 1 deletions
|
|
@ -2519,7 +2519,9 @@ async def next_cmd(mc, cmds, json_output=False):
|
||||||
if cmds[1].isnumeric() :
|
if cmds[1].isnumeric() :
|
||||||
nb = int(cmds[1])
|
nb = int(cmds[1])
|
||||||
else:
|
else:
|
||||||
nb = get_channel_by_name(mc, cmds[1])['channel_idx']
|
chan = await get_channel_by_name(mc, cmds[1])
|
||||||
|
print (chan)
|
||||||
|
nb = chan['channel_idx']
|
||||||
res = await send_chan_msg(mc, nb, cmds[2])
|
res = await send_chan_msg(mc, nb, cmds[2])
|
||||||
logger.debug(res)
|
logger.debug(res)
|
||||||
if res.type == EventType.ERROR:
|
if res.type == EventType.ERROR:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue