Add missing modlog reasons (#1787)

This commit is contained in:
SleeplessOne1917 2023-07-03 20:52:33 +00:00 committed by GitHub
parent a0cf54c0a0
commit e829b13053
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View 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,
});
}

View 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,