mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
Fix unnecessary plus call again (#1542)
This commit is contained in:
parent
bce6cd5d1c
commit
da936e1a08
1 changed files with 4 additions and 0 deletions
|
|
@ -32,6 +32,10 @@ export function useIsPlusUser(): boolean | undefined {
|
|||
|
||||
/** Check if the user is a Plus user. */
|
||||
export async function checkIsPlusUser(): Promise<boolean | undefined> {
|
||||
if (!getSettings().plusLicenseKey) {
|
||||
turnOffPlus();
|
||||
return false;
|
||||
}
|
||||
const brevilabsClient = BrevilabsClient.getInstance();
|
||||
const result = await brevilabsClient.validateLicenseKey();
|
||||
return result.isValid;
|
||||
|
|
|
|||
Loading…
Reference in a new issue