From d24b96cada3ed98cd5420ab18b36eab9e0971c05 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Thu, 21 Dec 2023 11:16:51 -0800 Subject: [PATCH] deps: fix nostr-sdk changes --- src/main.rs | 8 ++++---- src/nip19.rs | 1 + src/render.rs | 1 + 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index b995375..ba215a9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -72,13 +72,13 @@ pub async fn find_note(app: &Notecrumbs, nip19: &Nip19) -> Result { - debug!("got event 1 {:?}", ev); - note = Some(ev); + RelayPoolNotification::Event { event, .. } => { + debug!("got event 1 {:?}", event); + note = Some(event); return Ok(FindNoteResult { note, profile }); } RelayPoolNotification::RelayStatus { .. } => continue, - RelayPoolNotification::Message(_url, msg) => match msg { + RelayPoolNotification::Message { message, .. } => match message { RelayMessage::Event { event, .. } => { if event.kind == Kind::Metadata { debug!("got profile {:?}", event); diff --git a/src/nip19.rs b/src/nip19.rs index 788fe2e..d89a2ba 100644 --- a/src/nip19.rs +++ b/src/nip19.rs @@ -21,6 +21,7 @@ pub fn to_filters(nip19: &Nip19) -> Result, Error> { .kind(Kind::Metadata) .limit(1)]), Nip19::Secret(_sec) => Err(Error::InvalidNip19), + Nip19::Coordinate(_coord) => Err(Error::InvalidNip19), } } diff --git a/src/render.rs b/src/render.rs index fa98160..373b73b 100644 --- a/src/render.rs +++ b/src/render.rs @@ -272,6 +272,7 @@ pub fn get_render_data(app: &Notecrumbs, target: &Nip19) -> Result Err(Error::InvalidNip19), + Nip19::Coordinate(_coord) => Err(Error::InvalidNip19), } }