LanguageTag,
},
ImageObject,
+ InCommunity,
Source,
},
};
kind: PageType::Page,
id: ObjectId::new(self.ap_id.clone()),
attributed_to: AttributedTo::Lemmy(ObjectId::new(creator.actor_id)),
- to: vec![community.actor_id.into(), public()],
+ to: vec![community.actor_id.clone().into(), public()],
cc: vec![],
name: self.name.clone(),
content: self.body.as_ref().map(|b| markdown_to_html(b)),
language,
published: Some(convert_datetime(self.published)),
updated: self.updated.map(convert_datetime),
+ audience: Some(ObjectId::new(community.actor_id)),
};
Ok(page)
}
let local_site_data = fetch_local_site_data(context.pool()).await?;
- let community = page.extract_community(context, request_counter).await?;
+ let community = page.community(context, request_counter).await?;
check_apub_id_valid_with_strictness(
page.id.inner(),
community.local,
.creator()?
.dereference(context, local_instance(context).await, request_counter)
.await?;
- let community = page.extract_community(context, request_counter).await?;
+ let community = page.community(context, request_counter).await?;
let form = if !page.is_mod_action(context).await? {
let first_attachment = page.attachment.into_iter().map(Attachment::url).next();