Access pid when post's vote increments or decrements
Solved
Plugin Development
-
Hello, I need to store user's reputations based on predetermined categories via a plugin. New reputation will be stored as a new field in the database.
So I took a look at NodeBB Hook System. I found out that
action:user.set
hook is best for doing that. But the problem is, it doesn't providepid
to find out which category it was. You might suggestaction:post.updatePostVoteCount
hook, but it doesn't provide type of voting (increment or decrement).
Are there any solutions for this? Or requires the hook system to be developed? -
There are dynamic hooks. So because of that, they aren't displayed in the hooks list, probably.
Those hooks are defined here - src/posts/votes.js#L147.
Copyright © 2024 NodeBB | Contributors