[CORL-882] option to reject all a user's comments when banning (#2827)

* show comment counts for stories in story table

* remove debug code

* add rejector task

* connect comment rejection job to user banning

* localize strings

* remove debug code

* remove debug code

* resolve merge conflicts

* add documentation to rejectExistingComments

* clean up rejector task

* add TODO about broker

* make rejectExistingComments nullable
This commit is contained in:
Tessa Thornton
2020-02-21 12:38:40 -05:00
committed by GitHub
parent ca52cc3253
commit d6db287c55
24 changed files with 491 additions and 120 deletions
@@ -45,8 +45,9 @@ const BanUserMutation = createMutation(
`,
variables: {
input: {
message: input.message,
userID: input.userID,
message: input.message,
rejectExistingComments: input.rejectExistingComments,
clientMutationId: clientMutationId.toString(),
},
},
@@ -38,6 +38,7 @@ const UserBanPopoverContainer: FunctionComponent<Props> = ({
banUser({
userID: user.id,
commentID: comment.id,
rejectExistingComments: false,
message: getMessage(
localeBundles,
"common-banEmailTemplate",
@@ -229,6 +229,7 @@ it("ban user", async () => {
banUser: ({ variables }) => {
expectAndFail(variables).toMatchObject({
userID: firstComment.author!.id,
rejectExistingComments: false,
});
return {
user: pureMerge<typeof firstComment.author>(firstComment.author, {