commit d24b96cada3ed98cd5420ab18b36eab9e0971c05
parent 82997c30ae8340918f4932f761e892df8792efaa
Author: William Casarin <jb55@jb55.com>
Date: Thu, 21 Dec 2023 11:16:51 -0800
deps: fix nostr-sdk changes
Diffstat:
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/main.rs b/src/main.rs
@@ -72,13 +72,13 @@ pub async fn find_note(app: &Notecrumbs, nip19: &Nip19) -> Result<FindNoteResult
loop {
match client.notifications().recv().await? {
- RelayPoolNotification::Event(_url, ev) => {
- 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
@@ -21,6 +21,7 @@ pub fn to_filters(nip19: &Nip19) -> Result<Vec<Filter>, 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
@@ -272,6 +272,7 @@ pub fn get_render_data(app: &Notecrumbs, target: &Nip19) -> Result<PartialRender
)?)),
Nip19::Secret(_nsec) => Err(Error::InvalidNip19),
+ Nip19::Coordinate(_coord) => Err(Error::InvalidNip19),
}
}