Wow! So turns out it was a silly error on my part. I had tried the Error object previously, but it was while looking at a different part of the code... I was actually looking/changing the 'imagekit' case in the code and being stumped as to why I was still seeing the behavior as I explained. Anyhow, it is working as it should when passing in an Error object. Thanks for the extra insight!
yzahn last edited by
I am trying to use the static hook:
static:messaging.canMessageUserto 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?
Hmm, looks like static hooks are not sending the error back which seems to be the problem. Can you open an issue on our github tracker.