Skip to content

feat: add background group text sending - #19

Open
Shinichi1Kudo wants to merge 1 commit into
huohuoer:mainfrom
Shinichi1Kudo:feat/background-group-send
Open

feat: add background group text sending#19
Shinichi1Kudo wants to merge 1 commit into
huohuoer:mainfrom
Shinichi1Kudo:feat/background-group-send

Conversation

@Shinichi1Kudo

Copy link
Copy Markdown

Summary

  • Add wechat-cli send GROUP TEXT for background text sending to an exact, uniquely resolved group chat.
  • Support macOS ARM64 WeChat 4.1.8, with a pinned binary fingerprint checked before submission so incompatible binaries fail closed.
  • Confirm success only after WeChat's Mac-local outgoing message row has a positive local_id, positive server_id, the expected target and sender, exact text, and sent status.

Scope and safeguards

  • Group text only. Direct messages, File Transfer, images, files, voice, video, stickers, and other message types are rejected.
  • Targets must be either a unique exact group name or a real @chatroom ID already present in the contact database. Fuzzy names, duplicate names, forged IDs, and non-group contacts are rejected before submission.
  • The authenticated in-process bridge invokes WeChat's official message-task builder and submit chain on WeChat's main thread. It does not focus the WeChat window, operate the input box, simulate keyboard or mouse input, or write directly to WeChat's database.
  • Submission is treated as irreversible. If the submission boundary is crossed but local confirmation is incomplete, the command returns exit code 4 / status: unknown and explicitly disallows automatic retry.

CLI behavior

wechat-cli send "Exact Unique Group Name" "Message text"
wechat-cli send "54597320555@chatroom" $'Line one\nLine two' --timeout 15 --format json

Successful JSON includes success, status, request_id, group, username, local_id, and server_id. A successful result uses status: server_accepted.

Verification

  • python -m pytest -q: 279 passed
  • Native bridge and fake-host contract compile with -Wall -Wextra -Werror as part of the test suite
  • English and Chinese documentation cover supported scope, data flow, local visibility, exit codes, and operational risks

Add an experimental send command for exact, unique group targets on macOS ARM64 WeChat 4.1.8.

The command validates the runtime and target before submission, loads an authenticated in-process bridge on demand, submits text through WeChat's official task builder/submit chain, and confirms success only after a matching local outgoing row has positive local and server IDs.

Unknown outcomes are explicitly non-retryable. Direct messages, File Transfer, media messages, unsupported builds, ambiguous names, and forged chatroom IDs remain rejected. Chinese and English documentation cover the data flow, local visibility, exit codes, and operational risks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant