PostOrComment::Post(p) => Ok((p.clone(), None)),
PostOrComment::Comment(c) => {
let post_id = c.post_id;
PostOrComment::Post(p) => Ok((p.clone(), None)),
PostOrComment::Comment(c) => {
let post_id = c.post_id;
impl InCommunity for Note {
async fn community(&self, context: &Data<LemmyContext>) -> Result<ApubCommunity, LemmyError> {
let (post, _) = self.get_parents(context).await?;
impl InCommunity for Note {
async fn community(&self, context: &Data<LemmyContext>) -> Result<ApubCommunity, LemmyError> {
let (post, _) = self.get_parents(context).await?;
if let Some(audience) = &self.audience {
verify_community_matches(audience, community.actor_id.clone())?;
}
if let Some(audience) = &self.audience {
verify_community_matches(audience, community.actor_id.clone())?;
}