mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-07 21:32:51 +00:00
Merge branch 'unstable' into agent/automated-pr-review-fixes-3637557005884121646
This commit is contained in:
36 files changed
+1208
-990
No files matched your search
@@ -908,24 +908,16 @@ class HashtagPreferencesService {
|
||||
DEFAULT_NIP07_ENCRYPTION_METHODS,
|
||||
);
|
||||
if (!permissionResult?.ok) {
|
||||
const error =
|
||||
permissionResult?.error instanceof Error
|
||||
? permissionResult.error
|
||||
: new Error(
|
||||
"Extension encryption permissions are required to read hashtag preferences.",
|
||||
);
|
||||
error.code = "hashtag-preferences-permission-required";
|
||||
return { ok: false, error };
|
||||
userLogger.warn(
|
||||
`${LOG_PREFIX} Extension permission request failed/denied, but attempting operation via fallback.`,
|
||||
permissionResult?.error,
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
userLogger.warn(
|
||||
`${LOG_PREFIX} Extension permissions request failed while loading preferences`,
|
||||
`${LOG_PREFIX} Extension permissions request threw, attempting fallback.`,
|
||||
error,
|
||||
);
|
||||
const wrapped =
|
||||
error instanceof Error ? error : new Error(String(error));
|
||||
wrapped.code = "hashtag-preferences-permission-required";
|
||||
return { ok: false, error: wrapped };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -969,11 +961,12 @@ class HashtagPreferencesService {
|
||||
);
|
||||
}
|
||||
|
||||
const nostrApi = allowPermissionPrompt
|
||||
? typeof window !== "undefined"
|
||||
? window?.nostr
|
||||
: null
|
||||
: null;
|
||||
const nostrApi =
|
||||
typeof window !== "undefined" && window?.nostr
|
||||
? window.nostr
|
||||
: typeof globalThis !== "undefined" && globalThis?.nostr
|
||||
? globalThis.nostr
|
||||
: null;
|
||||
if (nostrApi) {
|
||||
if (typeof nostrApi.nip04?.decrypt === "function") {
|
||||
registerDecryptor(
|
||||
|
||||
Reference in new issue
Block a user