laravelista / comments

Native comments for your Laravel application.
MIT License
745 stars 144 forks source link

Re-approve on CommentUpdated #73

Open WBDC opened 4 years ago

WBDC commented 4 years ago

Hi,

First of all, thank you for this great package. Keep up the good work!

I required the approval on comments in the config file. I just noticed, that the users can update their comments after it has been approved, but it doesn't need to re-approve. For example, if a user comments some nasty stuff, then I would like to review the comment before it goes live, but if they modifying the original content, then the purpose of the approval goes out of the window.

Although I could listen to the CommentUpdated event, but I think this truly should be part of the package.

I hope this makes sense.

Many thanks

mabasic commented 4 years ago

Hello, thank you.

This could be implemented but it would require creating a new database column for comments. One for current content (approved) and one for future content (pending approval). So that we can still show the approved comment on website, but have a pending approval comment before it goes on the website.

This would likely increase the complexity of the package.

I'll think about implementing it when I sit down to resolve Laravel 6 issues people are having.

mabasic commented 4 years ago

Just tested with fresh install of Laravel Framework 6.13.1 and "laravelista/comments": "^3.1" and it works.

I agree that this functionality should be in this package and that is why I am leaving this issue open. I currently don't have the time to implement this, but I am open to a PR.

mabasic commented 3 years ago

Note to self: This should be dealt with. There are two ways of doing this:

  1. When the comment changes make it not approved thus removing it from the comments list until approved.
  2. Implement a way to keep the old comment visible, but keep the new waiting for approval content nearby until approved. Then replace the actual comment once approved. (preferred)