remark42 icon indicating copy to clipboard operation
remark42 copied to clipboard

Add premoderation support

Open paskal opened this issue 3 years ago • 3 comments

Based on discussions #1019 and #1236, support of holding new comments before the administrator approved them would be a nice feature to have.

paskal avatar Mar 27 '22 22:03 paskal

I made an investigation on the task. Unfortunately, I do not have enough expertise in the application. However, there is a solution that I can suggest: We introduce a new property that will set all new comments as pending (suggested by @umputun for backward compatibility). I assume in the future users may require some complete rules for the feature. We do not show pending messages to users except admins. The next step is to allow an admin to change the state of a message from Pending to Approved. For this task, we can use an existing API or introduce a new one specifically for this feature and under the /admin route.

Existing API

Make an update to the endpoint PUT /comment/{id} request. Introduce a new field Approved *bool. This will allow approving a comment or reverting it to the pending state.

New API

Create new endpoints: PATCH /admin/comment/{id}/approve - approve a comment PATCH /admin/comment/{id}/decline - decline a comment (set as pending) - I am not sure that this is relevant for now. It also may require some information, maybe a decline reason.

We can make the availability of the API only when the feature is enabled.

VlasovArtem avatar Jun 09 '24 13:06 VlasovArtem

hi @paskal, Is there any progress on this issue? Is it currently being worked on or in the backlog? Thanks!

fedmag avatar Oct 29 '25 15:10 fedmag

Hi, I'd like to work on this. I have a working version of the feature, I still need to polish it though. #1966

fedmag avatar Oct 30 '25 18:10 fedmag