flarum / issue-archive

0 stars 0 forks source link

[Approval] Create event for new unapproved post #117

Open matteocontrini opened 3 years ago

matteocontrini commented 3 years ago

Feature Request

Is your feature request related to a problem? Please describe.

The approval extension doesn't currently have an event for when a new unapproved post is created.

Describe the solution you'd like

I'm not sure about naming conventions of Flarum events, but there would be something like NewUnapproved.

Alternatively, the approval extension should raise the flag-Created event. (While Deleting is already called when approving a post.)

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep the amount of open issues to a manageable minimum. In any case, thanks for taking an interest in this software and contributing by opening the issue in the first place!

askvortsov1 commented 3 years ago

Couldn't we just hook into post created and check if the is_approved field is false?

Actually, nvm, since that's the field where is_approved would be set. Let's start with raising a "flag created" event.