mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-19 19:46:50 +00:00
Don't subscribe to events we don't need (2 places)
This commit is contained in:
parent
a90e0c0861
commit
88da5b8bb9
@ -480,14 +480,21 @@ impl Minion {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get ancestors we know of
|
||||||
filters.push(Filter {
|
filters.push(Filter {
|
||||||
ids: ids.clone(),
|
ids: ids.clone(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
|
|
||||||
// Replies and reactions to this post and ancestors
|
// Replies and reactions to ancestors
|
||||||
filters.push(Filter {
|
filters.push(Filter {
|
||||||
e: ids,
|
e: ids,
|
||||||
|
kinds: vec![
|
||||||
|
EventKind::TextNote,
|
||||||
|
EventKind::Reaction,
|
||||||
|
EventKind::EventDeletion,
|
||||||
|
],
|
||||||
since: Some(Unixtime::now().unwrap() - Duration::from_secs(feed_chunk)),
|
since: Some(Unixtime::now().unwrap() - Duration::from_secs(feed_chunk)),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
});
|
});
|
||||||
@ -653,7 +660,7 @@ impl Minion {
|
|||||||
let handle = format!("temp_subscribe_metadata_{}", &pubkeyhex.0);
|
let handle = format!("temp_subscribe_metadata_{}", &pubkeyhex.0);
|
||||||
let filter = Filter {
|
let filter = Filter {
|
||||||
authors: vec![pubkeyhex],
|
authors: vec![pubkeyhex],
|
||||||
kinds: vec![EventKind::Metadata, EventKind::ContactList],
|
kinds: vec![EventKind::Metadata],
|
||||||
// FIXME: we could probably get a since-last-fetched-their-metadata here.
|
// FIXME: we could probably get a since-last-fetched-their-metadata here.
|
||||||
// but relays should just return the lastest of these.
|
// but relays should just return the lastest of these.
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
Loading…
Reference in New Issue
Block a user