mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 03:11:32 +00:00
Dont send mentions to inbox of local community
also, dont start SendActivityTask for empty `to`, and remove useless comment
This commit is contained in:
parent
048fe287c2
commit
9e84fe20e6
3 changed files with 5 additions and 5 deletions
|
@ -164,7 +164,7 @@ where
|
|||
Kind: Serialize,
|
||||
<T as Extends<Kind>>::Error: From<serde_json::Error> + Send + Sync + 'static,
|
||||
{
|
||||
if !Settings::get().federation.enabled {
|
||||
if !Settings::get().federation.enabled || to.is_empty() {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
|
|
@ -506,7 +506,10 @@ async fn collect_non_local_mentions_and_addresses(
|
|||
}
|
||||
}
|
||||
|
||||
let mut inboxes = vec![community.get_shared_inbox_url()?];
|
||||
let mut inboxes: Vec<Url> = vec![];
|
||||
if !community.local {
|
||||
inboxes.push(community.get_shared_inbox_url()?);
|
||||
}
|
||||
inboxes.extend(mention_inboxes);
|
||||
inboxes = inboxes.into_iter().unique().collect();
|
||||
|
||||
|
|
|
@ -55,9 +55,6 @@ where
|
|||
|
||||
let timeout = Duration::from_secs(60);
|
||||
|
||||
// speed up tests
|
||||
// before: 305s
|
||||
// after: 240s
|
||||
let json = retry(|| {
|
||||
client
|
||||
.get(url.as_str())
|
||||
|
|
Loading…
Reference in a new issue