mirror of
https://github.com/wassname/talk.git
synced 2026-08-02 13:10:23 +08:00
Q&A Fixes (#2866)
* 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:
co-authored by
Wyatt Johnson
parent
c052d37a6f
commit
769ab2a910
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user