feat: macOS发送和windows统一

This commit is contained in:
Wxw-Gu committed 2026-11-25 16:04:59 +08:00
1 parent 518a9662a7
commit 9b2174a097
11 files changed
+710 -972

No files matched your search

@@ -29,6 +29,17 @@ export async function checkExtensionSendEntitlement(
const platform = dependencies.platform ?? process.platform
if (platform === 'darwin') {
try {
if (!dependencies.getMacLicense) {
const probe = dependencies.probeLicense
? await dependencies.probeLicense()
: await probeLicenseStatus()
if (probe.ok) {
const mapped = mapLicenseStatus(probe.status)
if (mapped.entitlement === 'valid') {
return { ok: true, message: '授权有效', source: 'mac_license' }
}
}
}
const status = dependencies.getMacLicense
? await dependencies.getMacLicense()
: await macWechatRuntimeManager.getMacLicenseStatus()