Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow registering multiple handlers for a notification #520

Open
michaelpj opened this issue Aug 27, 2023 · 0 comments
Open

Allow registering multiple handlers for a notification #520

michaelpj opened this issue Aug 27, 2023 · 0 comments

Comments

@michaelpj
Copy link
Collaborator

At the moment we only allow one handler per method. This is partly because it's unclear how we could respond to a request if we have multiple handlers (HLS has stuff to allow that, but it's complicated and I don't think we want it in here). But it's perfectly fine to have multiple handlers for a notification.

This would simplify part of our processing system. At the moment we intercept certain notifications in order to update our state before then calling the registered handler. But if we could have multiple handlers, then we could just install our own handler to update our state, and have it coexist with any user-provided handlers.

This would also simplify the situation if the user doesn't want to respond to those notifications. At the moment, they need to install a (possibly-empty) handler, otherwise they get errors about there being no handler!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

1 participant