mirror of
https://github.com/damus-io/notedeck.git
synced 2024-09-19 21:26:33 +00:00
ids: find more unknown ids from inline notes
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
402a1337f2
commit
6f2aa56b9e
27
src/app.rs
27
src/app.rs
@ -233,16 +233,31 @@ fn get_unknown_note_ids<'a>(
|
||||
ids.insert(UnknownId::Pubkey(nprofile.pubkey()));
|
||||
}
|
||||
}
|
||||
Mention::Event(ev) => {
|
||||
if ndb.get_note_by_id(txn, ev.id()).is_err() {
|
||||
Mention::Event(ev) => match ndb.get_note_by_id(txn, ev.id()) {
|
||||
Err(_) => {
|
||||
ids.insert(UnknownId::Id(ev.id()));
|
||||
if let Some(pk) = ev.pubkey() {
|
||||
if ndb.get_profile_by_pubkey(txn, pk).is_err() {
|
||||
ids.insert(UnknownId::Pubkey(pk));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Mention::Note(note) => {
|
||||
if ndb.get_note_by_id(txn, note.id()).is_err() {
|
||||
Ok(note) => {
|
||||
if ndb.get_profile_by_pubkey(txn, note.pubkey()).is_err() {
|
||||
ids.insert(UnknownId::Pubkey(note.pubkey()));
|
||||
}
|
||||
}
|
||||
},
|
||||
Mention::Note(note) => match ndb.get_note_by_id(txn, note.id()) {
|
||||
Err(_) => {
|
||||
ids.insert(UnknownId::Id(note.id()));
|
||||
}
|
||||
}
|
||||
Ok(note) => {
|
||||
if ndb.get_profile_by_pubkey(txn, note.pubkey()).is_err() {
|
||||
ids.insert(UnknownId::Pubkey(note.pubkey()));
|
||||
}
|
||||
}
|
||||
},
|
||||
_ => {}
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user