diff --git a/src/components/settings/RelayListsSettings.tsx b/src/components/settings/RelayListsSettings.tsx index ceac87b..a3fabaa 100644 --- a/src/components/settings/RelayListsSettings.tsx +++ b/src/components/settings/RelayListsSettings.tsx @@ -72,6 +72,15 @@ const RELAY_LIST_KINDS: RelayListKindUIConfig[] = [ tagName: "relay", hasMarkers: false, }, + { + kind: 10012, + name: "Favorite Relays", + description: + "Relays you find interesting or want to browse. Can be used by clients for relay discovery and recommendations.", + nip: "51", + tagName: "relay", + hasMarkers: false, + }, { kind: 10050, name: "DM Relays", @@ -362,6 +371,10 @@ export function RelayListsSettings() { () => (pubkey ? eventStore.replaceable(10007, pubkey, "") : undefined), [pubkey], ); + const event10012 = use$( + () => (pubkey ? eventStore.replaceable(10012, pubkey, "") : undefined), + [pubkey], + ); const event10050 = use$( () => (pubkey ? eventStore.replaceable(10050, pubkey, "") : undefined), [pubkey], @@ -372,9 +385,10 @@ export function RelayListsSettings() { 10002: event10002, 10006: event10006, 10007: event10007, + 10012: event10012, 10050: event10050, }), - [event10002, event10006, event10007, event10050], + [event10002, event10006, event10007, event10012, event10050], ); // Local draft state: kind -> entries diff --git a/src/hooks/useAccountSync.ts b/src/hooks/useAccountSync.ts index 0170995..380ba28 100644 --- a/src/hooks/useAccountSync.ts +++ b/src/hooks/useAccountSync.ts @@ -89,7 +89,7 @@ export function useAccountSync() { }; }, [activeAccount?.pubkey, eventStore, setActiveAccountRelays]); - // Fetch other replaceable relay lists (10006, 10007, 10050) when account changes + // Fetch other replaceable relay lists when account changes // These are read directly from EventStore in the settings UI, we just need to trigger fetching useEffect(() => { if (!activeAccount?.pubkey) { @@ -97,7 +97,7 @@ export function useAccountSync() { } const pubkey = activeAccount.pubkey; - const relayListKinds = [10006, 10007, 10050]; + const relayListKinds = [10006, 10007, 10012, 10050]; const subscriptions = relayListKinds.map((kind) => addressLoader({ kind, pubkey, identifier: "" }).subscribe(),