deps: fix nostr-sdk changes

This commit is contained in:
William Casarin 2023-12-21 11:16:51 -08:00
parent 82997c30ae
commit d24b96cada
3 changed files with 6 additions and 4 deletions

View File

@ -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);

View File

@ -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),
}
}

View File

@ -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),
}
}