]> Untitled Git - lemmy.git/blobdiff - crates/apub/src/activities/community/report.rs
Make functions work with both connection and pool (#3420)
[lemmy.git] / crates / apub / src / activities / community / report.rs
index 750672edb0f025d283edd91dbae46d0184671c67..1dffacc39faa666d1847e5d987c73de509371fdc 100644 (file)
@@ -134,7 +134,7 @@ impl ActivityHandler for Report {
           reason: self.summary,
           original_post_body: post.body.clone(),
         };
-        PostReport::report(context.pool(), &report_form).await?;
+        PostReport::report(&mut context.pool(), &report_form).await?;
       }
       PostOrComment::Comment(comment) => {
         let report_form = CommentReportForm {
@@ -143,7 +143,7 @@ impl ActivityHandler for Report {
           original_comment_text: comment.content.clone(),
           reason: self.summary,
         };
-        CommentReport::report(context.pool(), &report_form).await?;
+        CommentReport::report(&mut context.pool(), &report_form).await?;
       }
     };
     Ok(())