diff --git a/src/lib/stores/repos.ts b/src/lib/stores/repos.ts index 9cc55bc..4aea327 100644 --- a/src/lib/stores/repos.ts +++ b/src/lib/stores/repos.ts @@ -39,14 +39,18 @@ export const ensureRepo = (a: string | NDKEvent): Writable => { ...event_defaults, } - repos[a] = writable(base) - const a_ref = extractAReference(a) - if (!a_ref) return repos[a] + if (!a_ref) return writable(base) const { pubkey, identifier } = a_ref + repos[a] = writable({ + ...base, + identifier, + author: pubkey, + }) + const sub = ndk.subscribe( { kinds: [repo_kind], '#d': [identifier], authors: [pubkey] }, {