Add missing modlog reasons (#1787)
authorSleeplessOne1917 <abias1122@gmail.com>
Mon, 3 Jul 2023 20:52:33 +0000 (20:52 +0000)
committerGitHub <noreply@github.com>
Mon, 3 Jul 2023 20:52:33 +0000 (16:52 -0400)
src/shared/components/comment/comment-node.tsx
src/shared/components/post/post-listing.tsx

index 662b67be4655ed962bf051c21713a812d67a9b63..15d912ee809403256c87179c7976707a231b7be8 100644 (file)
@@ -1461,6 +1461,7 @@ export class CommentNode extends Component<CommentNodeProps, CommentNodeState> {
       comment_id: i.commentId,
       removed: !i.commentView.comment.removed,
       auth: myAuthRequired(),
+      reason: i.state.removeReason,
     });
   }
 
index a4ce5db54af50d8ac60a6b5289034b126087a557..84851de90262da51c8bb60b29c92b4e387215a1d 100644 (file)
@@ -1415,6 +1415,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
       UserService.Instance.myUserInfo?.local_user_view.person.id
     );
   }
+
   handleEditClick(i: PostListing) {
     i.setState({ showEdit: true });
   }
@@ -1538,6 +1539,7 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
       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<PostListingProps, PostListingState> {
   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,