mirror of
https://github.com/SableClient/Sable.git
synced 2026-11-20 09:01:17 -08:00
The native plugin returns Option<bool> (true=granted, false=denied, null=never-asked) but the JS bindings typed it as Promise<boolean>, flattening the tri-state. Fix the types to Promise<boolean | null>, add a non-prompting isUnifiedPushPermissionGranted, and pre-check permission at startup: if denied, sync backgroundPushEnabled to false and skip registration; if never-asked or granted, proceed (prompting if needed). On registration failure, re-check and sync if now denied.