fix(simplex): use structured /_send for standalone DM text sends

The _standalone_send() function (used by the send_message tool for
proactive/scheduled sends) has the same bare `@<id> text` bug that
send() had before PR #44444. SimpleX's `@<x>` syntax resolves x as a
display name, not a contactId — the daemon silently drops messages
when it cannot find a contact named "6".

Use the structured `/_send @<id> json [...]` form, matching what
send_image, send_document, and the send() fix already use.

Fixes #46265
This commit is contained in:
liuhao1024
2026-06-15 09:23:46 +08:00
committed by kshitij
parent 3a04d9c4d7
commit eb048772f6
2 changed files with 62 additions and 2 deletions
+4 -2
View File
@@ -1269,8 +1269,10 @@ async def _standalone_send(
)
cmd_str = f"/_send #{group_id} json {composed}"
else:
# Direct contacts are addressed by display name without brackets.
cmd_str = f"@{chat_id} {message}"
composed = json.dumps(
[{"msgContent": {"type": "text", "text": message}}]
)
cmd_str = f"/_send @{chat_id} json {composed}"
payload = {
"corrId": f"{_CORR_PREFIX}snd-{int(time.time() * 1000)}",