From 2f48c58b85b81ef45e3e25bb1279494e67fa6021 Mon Sep 17 00:00:00 2001 From: Nan93 <11462216+Nan93@users.noreply.github.com> Date: Sat, 11 Apr 2026 19:38:56 +0800 Subject: [PATCH] fix: normalize iOS unicode dashes in slash command args MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit iOS auto-corrects -- to — (em dash) and - to – (en dash), causing commands like /model glm-4.7 —provider zai to fail with 'Model names cannot contain spaces'. Normalize at get_command_args(). --- gateway/platforms/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gateway/platforms/base.py b/gateway/platforms/base.py index ad6e89b7..bba93214 100644 --- a/gateway/platforms/base.py +++ b/gateway/platforms/base.py @@ -752,7 +752,10 @@ class MessageEvent: if not self.is_command(): return self.text parts = self.text.split(maxsplit=1) - return parts[1] if len(parts) > 1 else "" + args = parts[1] if len(parts) > 1 else "" + # iOS auto-corrects -- to — (em dash) and - to – (en dash) + args = args.replace("\u2014\u2014", "--").replace("\u2014", "--").replace("\u2013", "-") + return args @dataclass