mirror of
https://github.com/wassname/talk.git
synced 2026-08-12 12:30:39 +08:00
[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:
@@ -45,8 +45,9 @@ const BanUserMutation = createMutation(
|
||||
`,
|
||||
variables: {
|
||||
input: {
|
||||
message: input.message,
|
||||
userID: input.userID,
|
||||
message: input.message,
|
||||
rejectExistingComments: input.rejectExistingComments,
|
||||
clientMutationId: clientMutationId.toString(),
|
||||
},
|
||||
},
|
||||
|
||||
+1
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user