From fa62ce39eaf4c01e3140229a746b3761b5de3620 Mon Sep 17 00:00:00 2001 From: SleeplessOne1917 Date: Mon, 3 Jul 2023 13:13:12 -0400 Subject: [PATCH] Add missing modlog reasons --- src/shared/components/comment/comment-node.tsx | 1 + src/shared/components/post/post-listing.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/shared/components/comment/comment-node.tsx b/src/shared/components/comment/comment-node.tsx index 662b67be..15d912ee 100644 --- a/src/shared/components/comment/comment-node.tsx +++ b/src/shared/components/comment/comment-node.tsx @@ -1461,6 +1461,7 @@ export class CommentNode extends Component { comment_id: i.commentId, removed: !i.commentView.comment.removed, auth: myAuthRequired(), + reason: i.state.removeReason, }); } diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index a4ce5db5..84851de9 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -1415,6 +1415,7 @@ export class PostListing extends Component { UserService.Instance.myUserInfo?.local_user_view.person.id ); } + handleEditClick(i: PostListing) { i.setState({ showEdit: true }); } @@ -1538,6 +1539,7 @@ export class PostListing extends Component { post_id: i.postView.post.id, removed: !i.postView.post.removed, auth: myAuthRequired(), + reason: i.state.removeReason, }); } @@ -1609,13 +1611,13 @@ export class PostListing extends Component { handlePurgeSubmit(i: PostListing, event: any) { event.preventDefault(); i.setState({ purgeLoading: true }); - if (i.state.purgeType == PurgeType.Person) { + if (i.state.purgeType === PurgeType.Person) { i.props.onPurgePerson({ person_id: i.postView.creator.id, reason: i.state.purgeReason, auth: myAuthRequired(), }); - } else if (i.state.purgeType == PurgeType.Post) { + } else if (i.state.purgeType === PurgeType.Post) { i.props.onPurgePost({ post_id: i.postView.post.id, reason: i.state.purgeReason,