Right now if I load a module that adds adhoc commands onto a pubsub component host, it does not work.
This is because the adhoc and pubsub modules both hook host-disco-items-node with the same priority and the pubsub module consumes the event in the case of not-found instead of letting that bubble up to mod_disco.
One possible solution is to set the hook in mod_adhoc to a higher priority than 0 and then change the last line to:
I have confirmed that this works.
The other way could be to have mod_pubsub not do the return true in a not-found error case but instead to return nil without setting event.exists to true, thus getting the same not-found error out of mod_disco in the normal case but allowing other modules to respond to the event in the meantime.