mirror of
https://github.com/wassname/talk.git
synced 2026-08-18 12:30:39 +08:00
fix: added support for comment edit mod passthrough
This commit is contained in:
@@ -293,7 +293,16 @@ const setStatus = async (ctx, { id, status }) => {
|
||||
*/
|
||||
const editComment = async (
|
||||
ctx,
|
||||
{ id, asset_id, edit: { body, metadata = {} } }
|
||||
{
|
||||
id,
|
||||
asset_id,
|
||||
edit: {
|
||||
body,
|
||||
metadata = {},
|
||||
status: commentStatus,
|
||||
actions: commentActions = [],
|
||||
},
|
||||
}
|
||||
) => {
|
||||
const {
|
||||
connectors: {
|
||||
@@ -303,7 +312,13 @@ const editComment = async (
|
||||
|
||||
// Build up the new comment we're setting. We need to check this with
|
||||
// moderation now.
|
||||
let comment = { id, asset_id, body };
|
||||
let comment = {
|
||||
id,
|
||||
asset_id,
|
||||
body,
|
||||
status: commentStatus,
|
||||
actions: commentActions,
|
||||
};
|
||||
|
||||
// Determine the new status of the comment.
|
||||
const { actions, status } = await Moderation.process(ctx, comment);
|
||||
|
||||
Reference in New Issue
Block a user