Static hooks
-
Hi,
I am trying to use the static hook:static:messaging.canMessageUser
to add custom logic to the permission checks if a user may message another user.
However, it seems that static hooks cannot alter the flow of nodebb. Throwing an error or returning false etc. do not do anything.
Shouldn't this rather be a filter hook?
Or am I misunderstanding something? -
Throwing an error in a static hook doesn't propagate to caller · Issue #8120 · NodeBB/NodeBB
NodeBB version: 1.13.1 NodeBB git hash: d1e0672 Installed NodeBB Plugins: N/A Database type: N/A Database version: N/A Exact steps to cause this issue: I am trying to handle static:messaging.canMessageUser with custom logic to block cert...
GitHub (github.com)
Copyright © 2025 NodeBB | Contributors