feat: 优化 macOS 微信发送消息能力

参考 wechat_chatter PR #36:
https://github.com/yincongcyincong/wechat_chatter/pull/36

补充 WeChat 4.1.11.53 的 GetService / CdnManager 地址,
并适配绑定后的发送能力检测逻辑。
This commit is contained in:
Wxw-Gu
2026-09-14 15:59:08 +08:00
parent 5efae86fcf
commit cf9ea8a83b
14 changed files with 659 additions and 171 deletions
@@ -11,6 +11,7 @@ const status = (
arch: 'arm64',
sipDisabled: true,
wechatRunning: true,
wechatPid: 123,
endpoint: '127.0.0.1:58080',
endpointReady: true,
runtimeReady: true,
@@ -34,10 +35,22 @@ describe('PersonalWechatCapabilityService', () => {
['unsupported', status({ platform: 'linux' })],
['unconfigured', status({ runtimeReady: false, boundWechatPid: undefined })],
['needs_binding', status({ runtimeReady: true, boundWechatPid: undefined })],
['needs_verification', status({ boundWechatPid: 123 })],
['needs_binding', status({ runtimeReady: true, boundWechatPid: 999 })],
['initializing', status({ boundWechatPid: 123 })],
['ready', status({ state: 'online', boundWechatPid: 123, canSendImage: true, canSend: true })],
[
'ready',
status({
state: 'online',
boundWechatPid: 123,
canSend: true,
canSendText: true,
canSendImage: false,
canSendVoice: true
})
],
['error', status({ state: 'error', boundWechatPid: 123, error: 'hook failed' })],
['needs_verification', status({ platform: 'win32', endpoint: '127.0.0.1:4567' })],
['initializing', status({ platform: 'win32', endpoint: '127.0.0.1:4567' })],
[
'ready',
status({