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:
@@ -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)}",
|
||||
|
||||
Reference in New Issue
Block a user