From 6661c7cb326a5a6a8b3467bb8b3a01ac40031725 Mon Sep 17 00:00:00 2001 From: Alejandro Gomez Date: Tue, 4 Jul 2023 16:36:36 +0200 Subject: [PATCH] fix: show hosted streams on profile --- src/hooks/profile.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/hooks/profile.ts b/src/hooks/profile.ts index 1d62d44..b83970f 100644 --- a/src/hooks/profile.ts +++ b/src/hooks/profile.ts @@ -21,6 +21,17 @@ export function useProfile(link: NostrLink, leaveOpen = false) { .withFilter() .kinds([LIVE_STREAM]) .authors([link.id]); + + const b2 = new RequestBuilder(`profile-host:${link.id.slice(0, 12)}`); + b2.withOptions({ + leaveOpen, + }) + .withFilter() + .kinds([LIVE_STREAM]) + .tag("p", [link.id]); + + b.add(b2); + return b; }, [link, leaveOpen]); @@ -57,7 +68,7 @@ export function useProfile(link: NostrLink, leaveOpen = false) { ); const zaps = (zapsData ?? []) .map((ev) => parseZap(ev, System.ProfileLoader.Cache)) - .filter((z) => z && z.valid); + .filter((z) => z && z.valid && z.receiver === link.id); return { streams,