mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-12-01 17:25:15 +08:00
feat: macOS发送和windows统一
This commit is contained in:
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()
|
||||
|
||||
Reference in new issue
Block a user