From ee7dde4ca22ca6aea7f0d6609760e557d5d7d991 Mon Sep 17 00:00:00 2001 From: MarekWo Date: Sun, 28 Dec 2025 20:46:06 +0100 Subject: [PATCH] fix(cli): Replace 'public' command with 'chan 0' to fix quote handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: Messages sent to Public channel had visible double quotes around multi-word text (e.g., "Hello world" appeared as "Hello world" in chat). Root cause: In interactive mode, meshcli's 'public' command treats quotes literally as part of message content, while 'chan' command correctly parses them as argument delimiters. Solution: Use 'chan 0' for Public channel instead of 'public' command. This ensures consistent quote handling across all channels. Before: - Public (ch 0): public "message" → quotes visible in output - Other channels: chan "message" → quotes correctly parsed ✓ After: - All channels: chan "message" → consistent behavior ✓ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- app/meshcore/cli.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/app/meshcore/cli.py b/app/meshcore/cli.py index a3f48be..94d3292 100644 --- a/app/meshcore/cli.py +++ b/app/meshcore/cli.py @@ -100,12 +100,9 @@ def send_message(text: str, reply_to: Optional[str] = None, channel_index: int = else: message = text - if channel_index == 0: - # Public channel - backward compatibility - success, stdout, stderr = _run_command(['public', message]) - else: - # Other channels - use 'chan' command - success, stdout, stderr = _run_command(['chan', str(channel_index), message]) + # Use 'chan' command for all channels (including Public/0) for consistent quoting behavior + # Note: 'public' command treats quotes literally, while 'chan' properly parses them as delimiters + success, stdout, stderr = _run_command(['chan', str(channel_index), message]) return success, stdout or stderr