mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 12:51:18 +00:00
parent
97fc51b0cd
commit
cb4a3a03a2
2 changed files with 7 additions and 5 deletions
|
@ -189,10 +189,6 @@ where
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
for to_url in &to {
|
|
||||||
check_is_apub_id_valid(&to_url)?;
|
|
||||||
}
|
|
||||||
|
|
||||||
let activity = activity.into_any_base()?;
|
let activity = activity.into_any_base()?;
|
||||||
let serialised_activity = serde_json::to_string(&activity)?;
|
let serialised_activity = serde_json::to_string(&activity)?;
|
||||||
|
|
||||||
|
|
|
@ -338,7 +338,13 @@ async fn fetch_remote_community(
|
||||||
}
|
}
|
||||||
for o in outbox_items {
|
for o in outbox_items {
|
||||||
let page = PageExt::from_any_base(o)?.context(location_info!())?;
|
let page = PageExt::from_any_base(o)?.context(location_info!())?;
|
||||||
let post = PostForm::from_apub(&page, context, None).await?;
|
|
||||||
|
// The post creator may be from a blocked instance,
|
||||||
|
// if it errors, then continue
|
||||||
|
let post = match PostForm::from_apub(&page, context, None).await {
|
||||||
|
Ok(post) => post,
|
||||||
|
Err(_) => continue,
|
||||||
|
};
|
||||||
let post_ap_id = post.ap_id.as_ref().context(location_info!())?.clone();
|
let post_ap_id = post.ap_id.as_ref().context(location_info!())?.clone();
|
||||||
// Check whether the post already exists in the local db
|
// Check whether the post already exists in the local db
|
||||||
let existing = blocking(context.pool(), move |conn| {
|
let existing = blocking(context.pool(), move |conn| {
|
||||||
|
|
Loading…
Reference in a new issue