From 1b54bcf5f3d6413148d9f188aea3a81599d3cef3 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 29 Oct 2024 15:12:52 -0500 Subject: [PATCH] useNostrReq: add deprecation warning --- src/features/nostr/hooks/useNostrReq.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/features/nostr/hooks/useNostrReq.ts b/src/features/nostr/hooks/useNostrReq.ts index 586f51536..1d4a01a6e 100644 --- a/src/features/nostr/hooks/useNostrReq.ts +++ b/src/features/nostr/hooks/useNostrReq.ts @@ -5,7 +5,13 @@ import { useEffect, useRef, useState } from 'react'; import { useNostr } from 'soapbox/contexts/nostr-context'; import { useForceUpdate } from 'soapbox/hooks/useForceUpdate'; -/** Streams events from the relay for the given filters. */ +/** + * Streams events from the relay for the given filters. + * + * @deprecated Add a custom HTTP endpoint to Ditto instead. + * Integrating Nostr directly has too many problems. + * Soapbox should only connect to the Nostr relay to sign events, because it's required for Nostr to work. + */ export function useNostrReq(filters: NostrFilter[]): { events: NostrEvent[]; eose: boolean; closed: boolean } { const { relay } = useNostr();