async fn community(&self, context: &Data<LemmyContext>) -> Result<ApubCommunity, LemmyError> {
let cid = match self {
PostOrComment::Post(p) => p.community_id,
- PostOrComment::Comment(c) => Post::read(context.pool(), c.post_id).await?.community_id,
+ PostOrComment::Comment(c) => {
+ Post::read(&mut context.pool(), c.post_id)
+ .await?
+ .community_id
+ }
};
- Ok(Community::read(context.pool(), cid).await?.into())
+ Ok(Community::read(&mut context.pool(), cid).await?.into())
}
}