* Fix various Q&A moderation/tagging issues

- Allow Staff members to have their questions
answered and appropriately tagged
- Properly filter answering for only top level
questions (comments)
- Add documentation around various moderation
phases and comment creation steps
- Remove unnecessary status filter when setting
the status for a comment

* fix: abstracted out perspective configs

* fix: reworked tag injection

* Fix sorting/unused imports

Co-authored-by: Wyatt Johnson <accounts+github@wyattjoh.ca>
This commit is contained in:
Nick Funk
2020-02-27 14:40:01 -07:00
committed by GitHub
parent c052d37a6f
commit 769ab2a910
22 changed files with 393 additions and 399 deletions
-4
View File
@@ -2,7 +2,6 @@ import Queue, { Job } from "bull";
import { Db } from "mongodb";
import now from "performance-now";
import { Config } from "coral-server/config";
import logger from "coral-server/logger";
import {
Comment,
@@ -22,7 +21,6 @@ const JOB_NAME = "rejector";
export interface RejectorProcessorOptions {
mongo: Db;
redis: AugmentedRedis;
config: Config;
tenantCache: TenantCache;
}
@@ -49,7 +47,6 @@ const createJobProcessor = ({
mongo,
redis,
tenantCache,
config,
}: RejectorProcessorOptions) => async (job: Job<RejectorData>) => {
// Pull out the job data.
const { authorID, moderatorID, tenantID } = job.data;
@@ -85,7 +82,6 @@ const createJobProcessor = ({
await rejectComment(
mongo,
redis,
config,
null,
tenant,
comment.id,