Fix crash in federation tests
This commit is contained in:
parent
6b4eb79237
commit
2a3b475b99
1 changed files with 4 additions and 2 deletions
|
@ -325,8 +325,10 @@ async fn fetch_remote_community(
|
|||
let outbox =
|
||||
fetch_remote_object::<OrderedCollection>(client, &community.get_outbox_url()?).await?;
|
||||
let outbox_items = outbox.items().context(location_info!())?.clone();
|
||||
let outbox_items = outbox_items.many().context(location_info!())?;
|
||||
let outbox_items = outbox_items[0..20].to_vec();
|
||||
let mut outbox_items = outbox_items.many().context(location_info!())?;
|
||||
if outbox_items.len() > 20 {
|
||||
outbox_items = outbox_items[0..20].to_vec();
|
||||
}
|
||||
for o in outbox_items {
|
||||
let page = PageExt::from_any_base(o)?.context(location_info!())?;
|
||||
let post = PostForm::from_apub(&page, client, pool, None).await?;
|
||||
|
|
Loading…
Reference in a new issue