Use host tag
This commit is contained in:
@ -22,7 +22,8 @@ function ProfileInfo({ link }: { link: NostrLink }) {
|
||||
const thisEvent = useEventFeed(link, true);
|
||||
const login = useLogin();
|
||||
const navigate = useNavigate();
|
||||
const profile = useUserProfile(System, thisEvent.data?.pubkey);
|
||||
const host = thisEvent.data?.tags.find(a => a[0] === "p" && a[3] === "host")?.[1] ?? thisEvent.data?.pubkey;
|
||||
const profile = useUserProfile(System, host);
|
||||
const zapTarget = profile?.lud16 ?? profile?.lud06;
|
||||
|
||||
const status = findTag(thisEvent.data, "status");
|
||||
@ -77,7 +78,7 @@ function ProfileInfo({ link }: { link: NostrLink }) {
|
||||
)}
|
||||
</div>
|
||||
<div className="profile-info flex g24">
|
||||
<Profile pubkey={thisEvent.data?.pubkey ?? ""} />
|
||||
<Profile pubkey={host ?? ""} />
|
||||
{zapTarget && thisEvent.data && (
|
||||
<SendZapsDialog
|
||||
lnurl={zapTarget}
|
||||
@ -104,13 +105,11 @@ function VideoPlayer({ link }: { link: NostrLink }) {
|
||||
}
|
||||
|
||||
export function StreamPage() {
|
||||
const ref = useRef(null);
|
||||
const params = useParams();
|
||||
const link = parseNostrLink(params.id!);
|
||||
|
||||
return (
|
||||
<>
|
||||
<div ref={ref}></div>
|
||||
<VideoPlayer link={link} />
|
||||
<ProfileInfo link={link} />
|
||||
<LiveChat link={link} />
|
||||
|
Reference in New Issue
Block a user