Revert "Only fetch mentions on our read relays"

This reverts commit 91490e5cbf.
This commit is contained in:
Mike Dilger 2023-12-19 12:35:18 +13:00
parent 0f162f9b92
commit cc9e203f7d

View File

@ -247,13 +247,26 @@ impl Overlord {
// Subscribe to the general feed
self.engage_minion(
assignment.relay_url.clone(),
vec![RelayJob {
reason: RelayConnectionReason::Follow,
payload: ToMinionPayload {
job_id: rand::random::<u64>(),
detail: ToMinionPayloadDetail::SubscribeGeneralFeed(assignment.pubkeys.clone()),
vec![
RelayJob {
reason: RelayConnectionReason::Follow,
payload: ToMinionPayload {
job_id: rand::random::<u64>(),
detail: ToMinionPayloadDetail::SubscribeGeneralFeed(
assignment.pubkeys.clone(),
),
},
},
}],
RelayJob {
// Until NIP-65 is in widespread use, we should listen for mentions
// of us on all these relays too
reason: RelayConnectionReason::FetchMentions,
payload: ToMinionPayload {
job_id: rand::random::<u64>(),
detail: ToMinionPayloadDetail::SubscribeMentions,
},
},
],
)
.await?;
@ -2341,6 +2354,8 @@ impl Overlord {
}
// Separately subscribe to our mentions on our read relays
// NOTE: we also do this on all dynamically connected relays since NIP-65 is
// not in widespread usage.
let read_relay_urls: Vec<RelayUrl> = GLOBALS
.storage
.filter_relays(|r| r.has_usage_bits(Relay::READ) && r.rank != 0)?