From 15d1720da04a89ee9735d81da214c3b1764d70b5 Mon Sep 17 00:00:00 2001 From: Florent Date: Sat, 19 Apr 2025 08:57:24 +0200 Subject: [PATCH] correct display of public msgs --- pyproject.toml | 2 +- src/meshcore_cli/meshcore_cli.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 051e39e..ebbcfa2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" }, ] diff --git a/src/meshcore_cli/meshcore_cli.py b/src/meshcore_cli/meshcore_cli.py index 7c42a67..a855f58 100644 --- a/src/meshcore_cli/meshcore_cli.py +++ b/src/meshcore_cli/meshcore_cli.py @@ -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