mirror of
https://github.com/damus-io/notecrumbs.git
synced 2024-09-29 18:10:43 +00:00
deps: fix nostr-sdk changes
This commit is contained in:
parent
82997c30ae
commit
d24b96cada
@ -72,13 +72,13 @@ pub async fn find_note(app: &Notecrumbs, nip19: &Nip19) -> Result<FindNoteResult
|
|||||||
|
|
||||||
loop {
|
loop {
|
||||||
match client.notifications().recv().await? {
|
match client.notifications().recv().await? {
|
||||||
RelayPoolNotification::Event(_url, ev) => {
|
RelayPoolNotification::Event { event, .. } => {
|
||||||
debug!("got event 1 {:?}", ev);
|
debug!("got event 1 {:?}", event);
|
||||||
note = Some(ev);
|
note = Some(event);
|
||||||
return Ok(FindNoteResult { note, profile });
|
return Ok(FindNoteResult { note, profile });
|
||||||
}
|
}
|
||||||
RelayPoolNotification::RelayStatus { .. } => continue,
|
RelayPoolNotification::RelayStatus { .. } => continue,
|
||||||
RelayPoolNotification::Message(_url, msg) => match msg {
|
RelayPoolNotification::Message { message, .. } => match message {
|
||||||
RelayMessage::Event { event, .. } => {
|
RelayMessage::Event { event, .. } => {
|
||||||
if event.kind == Kind::Metadata {
|
if event.kind == Kind::Metadata {
|
||||||
debug!("got profile {:?}", event);
|
debug!("got profile {:?}", event);
|
||||||
|
@ -21,6 +21,7 @@ pub fn to_filters(nip19: &Nip19) -> Result<Vec<Filter>, Error> {
|
|||||||
.kind(Kind::Metadata)
|
.kind(Kind::Metadata)
|
||||||
.limit(1)]),
|
.limit(1)]),
|
||||||
Nip19::Secret(_sec) => Err(Error::InvalidNip19),
|
Nip19::Secret(_sec) => Err(Error::InvalidNip19),
|
||||||
|
Nip19::Coordinate(_coord) => Err(Error::InvalidNip19),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,6 +272,7 @@ pub fn get_render_data(app: &Notecrumbs, target: &Nip19) -> Result<PartialRender
|
|||||||
)?)),
|
)?)),
|
||||||
|
|
||||||
Nip19::Secret(_nsec) => Err(Error::InvalidNip19),
|
Nip19::Secret(_nsec) => Err(Error::InvalidNip19),
|
||||||
|
Nip19::Coordinate(_coord) => Err(Error::InvalidNip19),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user