* 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
co-authored by Wyatt Johnson
parent c052d37a6f
commit 769ab2a910
22 changed files with 393 additions and 399 deletions
+2 -5
View File
@@ -152,7 +152,7 @@ export async function createComment(
const { body, actionCounts = {}, metadata, ...rest } = input;
// Generate the revision.
const revision: Revision = {
const revision: Readonly<Revision> = {
id: uuid.v4(),
body,
actionCounts,
@@ -184,7 +184,7 @@ export async function createComment(
// Insert it into the database.
await collection(mongo).insertOne(comment);
return comment;
return { comment, revision };
}
/**
@@ -734,9 +734,6 @@ export async function updateCommentStatus(
id,
tenantID,
"revisions.id": revisionID,
status: {
$ne: status,
},
},
{
$set: { status },