aboutsummaryrefslogtreecommitdiffstats
path: root/src/nostr.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-20 23:14:41 -0700
committerAdam Soltys <[email protected]>2026-09-20 23:14:41 -0700
commit19ac1c46091e969075d998af95d304d82cbba259 (patch)
tree128552ece5b25e675e41eb7f5eed13760498813c /src/nostr.js
parentd5881643a18316efbd80b5acb9332726bcbc863f (diff)
downloadcoinosv3-19ac1c46091e969075d998af95d304d82cbba259.tar.gz
coinosv3-19ac1c46091e969075d998af95d304d82cbba259.zip
Feeds: follow packs from following.space (NIP-51 kind 39089) as a feed's people.
A feed can name packs as well as people: the pack's current members are its authors, read from the pack event itself and cached on disk, refreshed hourly when a feed using it is opened — so a curator's change reaches the feed by itself. The editor takes a pasted following.space link or naddr, or searches packs by title (NIP-50 on relay.nostr.band). parseNostrRef learned naddr. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'src/nostr.js')
-rw-r--r--src/nostr.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nostr.js b/src/nostr.js
index 0794386..b2d231c 100644
--- a/src/nostr.js
+++ b/src/nostr.js
@@ -253,6 +253,7 @@ export function parseNostrRef(input) {
if (d.type === 'nprofile') return { type: 'pubkey', pk: d.data.pubkey, relays: d.data.relays || [] };
if (d.type === 'note') return { type: 'event', id: d.data, relays: [] };
if (d.type === 'nevent') return { type: 'event', id: d.data.id, relays: d.data.relays || [], author: d.data.author || null };
+ if (d.type === 'naddr') return { type: 'addr', kind: d.data.kind, pk: d.data.pubkey, d: d.data.identifier || '', relays: d.data.relays || [] };
} catch {}
return null;
}