strapi-plugin-comments icon indicating copy to clipboard operation
strapi-plugin-comments copied to clipboard

Webhook for approved comments

Open OliveiraCleidson opened this issue 1 year ago • 2 comments

Description

It's a feature request, as far as I know, this feature not exists.

Can be interesting the feature that emits events via webhooks to the lifecycle of comments, like approved comments, created comments, and more.

What is my use case? I have systems that use Strapi as an admin panel, when one user has not registered in Strapi and comments in one content type, the moderator should approve these comments. When one comment is approved I want to run a policy in this comment, like sending e-mail, seeding another system, update a ranking.

Another use case is when a comment is created I want to send a notification to some systems without creating a stream connection between databases.

OliveiraCleidson avatar Apr 10 '23 19:04 OliveiraCleidson

Hello @OliveiraCleidson,

Sounds like a useful thing. We'll consider that.

cyp3rius avatar Apr 12 '23 20:04 cyp3rius

Hi @OliveiraCleidson,

I did some research about custom webhooks. It is possible to register new webhook event name. And probably trigger it. But for admin panel panel integration or visibility of said event names, results were not optimistic. Admin panel is pretty much hardcoded so registering of webhooks had to be done in comments section settings. For now we voted against it.

Next best thing we figured out were to connect entities of comments section to Strapi's content types lifecycle hooks. Connected PR addresses lifecycle approach. Don't worry, README.md was also updated.

CodeVoyager avatar Mar 02 '24 08:03 CodeVoyager

Release v2.3.0 contain this feature.

cyp3rius avatar May 29 '24 18:05 cyp3rius