#1808 Cannot add adhoc commands on pubsub host

Reporter Stephen Paul Weber
Owner Nobody
Stars ★ (1)
  • Difficulty-Easy
  • Status-Accepted
  • Priority-Medium
  • Type-Enhancement
  1. Stephen Paul Weber on

    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: event.origin.send(reply); return true; 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.

  2. Zash on

    Thanks for the report. Sounds like you already had a patch?

    • tags Status-Accepted Difficulty-Easy

New comment

Not published. Used for spam prevention and optional update notifications.