mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 11:21: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,
|
Kind: Serialize,
|
||||||
<T as Extends<Kind>>::Error: From<serde_json::Error> + Send + Sync + 'static,
|
<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(());
|
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.extend(mention_inboxes);
|
||||||
inboxes = inboxes.into_iter().unique().collect();
|
inboxes = inboxes.into_iter().unique().collect();
|
||||||
|
|
||||||
|
|
|
@ -55,9 +55,6 @@ where
|
||||||
|
|
||||||
let timeout = Duration::from_secs(60);
|
let timeout = Duration::from_secs(60);
|
||||||
|
|
||||||
// speed up tests
|
|
||||||
// before: 305s
|
|
||||||
// after: 240s
|
|
||||||
let json = retry(|| {
|
let json = retry(|| {
|
||||||
client
|
client
|
||||||
.get(url.as_str())
|
.get(url.as_str())
|
||||||
|
|
Loading…
Reference in a new issue