fix: report macos product version in presence
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
- macOS menu now refreshes the control channel after the gateway starts and shows “Connecting to gateway…” while the gateway is coming up.
|
||||
- macOS local mode now waits for the gateway to be ready before configuring the control channel, avoiding false “no connection” flashes.
|
||||
- WhatsApp watchdog now forces a reconnect even if the socket close event stalls (force-close to unblock reconnect loop).
|
||||
- Gateway presence now reports macOS product version (via `sw_vers`) instead of Darwin kernel version.
|
||||
|
||||
## 2.0.0-beta3 — 2025-12-27
|
||||
|
||||
|
||||
@@ -69,10 +69,17 @@ function initSelfPresence() {
|
||||
}
|
||||
return os.arch();
|
||||
})();
|
||||
const macOSVersion = () => {
|
||||
const res = spawnSync("sw_vers", ["-productVersion"], {
|
||||
encoding: "utf-8",
|
||||
});
|
||||
const out = typeof res.stdout === "string" ? res.stdout.trim() : "";
|
||||
return out.length > 0 ? out : os.release();
|
||||
};
|
||||
const platform = (() => {
|
||||
const p = os.platform();
|
||||
const rel = os.release();
|
||||
if (p === "darwin") return `macos ${rel}`;
|
||||
if (p === "darwin") return `macos ${macOSVersion()}`;
|
||||
if (p === "win32") return `windows ${rel}`;
|
||||
return `${p} ${rel}`;
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user