mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 13:52:58 +00:00
Fix hashtag preferences loading and profile persistence issues
- Migrated Kind 0 profile metadata storage to unified `profileCache.js` with partitioning and persistence. - Added `defaultDTag` for hashtag preferences in `cachePolicies.js` to ensure consistent key resolution. - Updated `hashtagPreferencesService.js` to use `profileCache` and implemented legacy data migration. - Added `handleEvent` to `NostrClient` to centrally ingest Kind 0 events into the cache. - Updated `authService.js` and `cache.js` to delegate profile operations to the unified cache system. - Added `PROFILE_METADATA` schema to `nostrEventSchemas.js`.
This commit is contained in:
1 parent
983f67fa1b
commit
a2de2b550d
7 files changed
+220
-124
No files matched your search
@@ -28,6 +28,7 @@ export const NOTE_TYPES = Object.freeze({
|
||||
ADMIN_BLACKLIST: "adminBlacklist",
|
||||
ADMIN_WHITELIST: "adminWhitelist",
|
||||
STORAGE_CHALLENGE: "storageChallenge",
|
||||
PROFILE_METADATA: "profileMetadata",
|
||||
});
|
||||
|
||||
export const SUBSCRIPTION_LIST_IDENTIFIER = "subscriptions";
|
||||
@@ -459,6 +460,16 @@ const BASE_SCHEMAS = {
|
||||
"Ephemeral challenge event used for key derivation; never published.",
|
||||
},
|
||||
},
|
||||
[NOTE_TYPES.PROFILE_METADATA]: {
|
||||
type: NOTE_TYPES.PROFILE_METADATA,
|
||||
label: "Profile metadata",
|
||||
kind: 0,
|
||||
appendTags: DEFAULT_APPEND_TAGS,
|
||||
content: {
|
||||
format: "json",
|
||||
description: "Standard NIP-01 profile metadata (name, about, picture, etc.).",
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
let schemaOverrides = {};
|
||||
|
||||
Reference in new issue
Block a user