Page MenuHomePhabricator

Check if comment needs moderation
Closed, ResolvedPublic3 Estimated Story Points


The "add comment" use case needs to use the text policy validator to set the "needs moderation" state.

If the comment needs to be moderated, the public flag must be set to false.

Also, the message below the comment field must reflect the state of the comment display, as outlined by the old code:

In the new app, the returned text must be translatable

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJun 8 2016, 1:54 PM
gabriel-wmde updated the task description. (Show Details)Jun 8 2016, 5:41 PM
gabriel-wmde changed the point value for this task from 1 to 3.
JeroenDeDauw added a subscriber: JeroenDeDauw.EditedJun 8 2016, 7:43 PM

Hah, I wanted to change this from 1 to 3 after having load this tab some hours ago, clicked edit, and saw it already happened.

Edit: nvm, I got confused, so the below is foobar

It is not obvious how to implement this. The needs moderation thing is part of donation. The AddCommentUseCase does not know about donations. It just creates a Comment and saves it via CommentRepository.

Possible approaches (incomplete list):

  • After storing comment, check if it causes moderation, and if so, fetch donation from DonationRepository, mark for donation and save it back.
  • Add a $needsModeration boolean parameter to CommentRepository::storeComment (CommentRepository already knows about Donation, but gets to know about moderation stuff like this)

Thoughts? I'm inclined to go with the later approach.

kai.nissen updated the task description. (Show Details)Jun 9 2016, 1:38 PM

Setting the "public" flag is now done in, although there is a better solution (new feature) outlined in T137704 which avoids overriding the explicit wish of the user.

The 2nd part of this task (indicating to the user if the comment is really visible or still needs moderation) still needs to be done.

Restricted Application added a project: WMDE-FUN-Team. · View Herald TranscriptApr 7 2017, 11:25 AM
Tobi_WMDE_SW closed this task as Resolved.Apr 7 2017, 11:25 AM
Tobi_WMDE_SW claimed this task.