From c51b0d7567746da0089b0ca8bbee48b8fdb26b35 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Mon, 30 Jun 2025 23:29:00 -0400 Subject: [PATCH] Fix nostr-sdk method usage --- src/nostr/client.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/nostr/client.py b/src/nostr/client.py index 7af1a0e..a222967 100644 --- a/src/nostr/client.py +++ b/src/nostr/client.py @@ -90,7 +90,7 @@ class NostrClient: # Use the EventBuilder to create and sign the event event = ( - EventBuilder.text_note(content, []) + EventBuilder.text_note(content) .build(self.keys.public_key()) .sign_with_keys(self.keys) ) @@ -116,14 +116,13 @@ class NostrClient: f = ( Filter() .author(pubkey) - .kind(Kind.from_standard(KindStandard.TEXT_NOTE)) + .kind(Kind.from_std(KindStandard.TEXT_NOTE)) .limit(1) ) - # Use the simple, synchronous get_events_of method - # Set a reasonable timeout + # Use the synchronous fetch_events method timeout = timedelta(seconds=10) - events = self.client.get_events_of([f], timeout) + events = self.client.fetch_events(f, timeout).to_vec() if not events: logger.warning("No events found on relays for this user.")