X-Git-Url: http://these/git/?a=blobdiff_plain;f=crates%2Fapub%2Fsrc%2Ffetcher%2Fpost_or_comment.rs;h=9291496690609743b38b5d1a4b6d719780353fe9;hb=1d38aad9d3d51ef606074d5b49a8030c49dd0e9e;hp=651abf7db90bcc41c1fd7676352a07b4f20a642c;hpb=73492af4b09448684ffde3d55454434ec3ed490b;p=lemmy.git diff --git a/crates/apub/src/fetcher/post_or_comment.rs b/crates/apub/src/fetcher/post_or_comment.rs index 651abf7d..92914966 100644 --- a/crates/apub/src/fetcher/post_or_comment.rs +++ b/crates/apub/src/fetcher/post_or_comment.rs @@ -91,8 +91,12 @@ impl InCommunity for PostOrComment { async fn community(&self, context: &Data) -> Result { 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()) } }