mirror of
https://github.com/wassname/talk.git
synced 2026-07-20 12:40:47 +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:
@@ -20,7 +20,7 @@ const rejectComment = async (
|
||||
mongo: Db,
|
||||
redis: AugmentedRedis,
|
||||
config: Config,
|
||||
broker: CoralEventPublisherBroker,
|
||||
broker: CoralEventPublisherBroker | null,
|
||||
tenant: Tenant,
|
||||
commentID: string,
|
||||
commentRevisionID: string,
|
||||
@@ -48,12 +48,16 @@ const rejectComment = async (
|
||||
actionCounts: {},
|
||||
});
|
||||
|
||||
// Publish changes to the event publisher.
|
||||
await publishChanges(broker, {
|
||||
...result,
|
||||
...counts,
|
||||
moderatorID,
|
||||
});
|
||||
// TODO: (wyattjoh) (tessalt) broker cannot easily be passed to stack from tasks,
|
||||
// see CORL-935 in jira
|
||||
if (broker) {
|
||||
// Publish changes to the event publisher.
|
||||
await publishChanges(broker, {
|
||||
...result,
|
||||
...counts,
|
||||
moderatorID,
|
||||
});
|
||||
}
|
||||
|
||||
// If there was a featured tag on this comment, remove it.
|
||||
if (hasTag(result.after, GQLTAG.FEATURED)) {
|
||||
|
||||
Reference in New Issue
Block a user