FEATURE: Add Revise... option for queued post reviewable (#23454)

This commit adds a new Revise... action that can be taken
for queued post reviewables. This will open a modal where
the user can select a Reason from a preconfigured list
(or by choosing Other..., a custom reason) and provide feedback
to the user about their post.

The post will be rejected still, but a PM will also be sent to
the user so they have an opportunity to improve their post when
they resubmit it.
This commit is contained in:
Martin Brennan
2023-10-13 11:28:31 +10:00
committed by GitHub
parent 5fe4e0ed48
commit 9762e65758
16 changed files with 385 additions and 7 deletions

View File

@ -222,11 +222,8 @@ class ReviewablesController < ApplicationController
return render_json_error(error)
end
if reviewable.type == "ReviewableUser"
args.merge!(
reject_reason: params[:reject_reason],
send_email: params[:send_email] != "false",
)
if reviewable.type_class.respond_to?(:additional_args)
args.merge!(reviewable.type_class.additional_args(params) || {})
end
plugin_params =