Extending PostActionTypes

Hey There,

We need to extend PostActionTypes to add a new action type to the post flagging feature.

RE: Model

https://github.com/discourse/discourse/blob/a0bbc346cb5d5b89d1a3efdfa89869349a8b067f/app/models/post_action_type.rb

RE: Model

https://github.com/discourse/discourse/blob/a0bbc346cb5d5b89d1a3efdfa89869349a8b067f/app/models/post_action.rb

Before I embark on some wild “extend these classes” plugin journey, I thought it prudent to ask the experts here on meta:

Is there a recommended “sys admin, non plugin” method to extend the PostActionTypes, so we can easily add a new type to the flagging feature below? Maybe I missed it and there is no need for a plugin?

We need to extend / modify these post_action_types so the list matches the mission and user behavior of our forum, and the current types below, while very good, they do not match the main issues we need to flag on our site:

Screen Shot 2021-02-17 at 11.59.43 AM

Thanks.

3 Likes

Could you share your own advice / experiences ?