Forgot comment report.

auto_resolve_reports_1
Dessalines 2024-02-14 11:15:25 -05:00
parent fac80ec87d
commit 6cc2647fdf
1 changed files with 6 additions and 1 deletions

View File

@ -14,7 +14,10 @@ use activitypub_federation::{
kinds::activity::FlagType, kinds::activity::FlagType,
traits::{ActivityHandler, Actor}, traits::{ActivityHandler, Actor},
}; };
use lemmy_api_common::{context::LemmyContext, utils::check_post_deleted_or_removed}; use lemmy_api_common::{
context::LemmyContext,
utils::{check_comment_deleted_or_removed, check_post_deleted_or_removed},
};
use lemmy_db_schema::{ use lemmy_db_schema::{
source::{ source::{
activity::ActivitySendTargets, activity::ActivitySendTargets,
@ -117,6 +120,8 @@ impl ActivityHandler for Report {
PostReport::report(&mut context.pool(), &report_form).await?; PostReport::report(&mut context.pool(), &report_form).await?;
} }
PostOrComment::Comment(comment) => { PostOrComment::Comment(comment) => {
check_comment_deleted_or_removed(&comment)?;
let report_form = CommentReportForm { let report_form = CommentReportForm {
creator_id: actor.id, creator_id: actor.id,
comment_id: comment.id, comment_id: comment.id,