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