correct display of public msgs

This commit is contained in:
Florent 2025-04-19 08:57:24 +02:00
parent 4c78695b61
commit 15d1720da0
2 changed files with 4 additions and 3 deletions

View file

@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project]
name = "meshcore-cli"
version = "0.6.3"
version = "0.6.4"
authors = [
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
]

View file

@ -102,10 +102,11 @@ async def process_event_message(mc, ev, json_output, end="\n", above=False):
print(disp)
elif (data['type'] == "CHAN") :
path_str = f"{ANSI_YELLOW}({path_str}){ANSI_END}"
disp = f"{ANSI_GREEN}ch{data['channel_idx']}{path_str}: {data['text']}"
if above:
print_above(f"{ANSI_GREEN}ch{data['channel_idx']}({path_str}): {data['text']}")
print_above(disp)
else:
print(f"ch{data['channel_idx']}({path_str}): {data['text']}")
print(disp)
else:
print(json.dumps(ev.payload))
return True