-
Notifications
You must be signed in to change notification settings - Fork 5
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
Create consumer hooks #3
base: main
Are you sure you want to change the base?
Conversation
…ls-yroom into jesse/create-consumer-hooks
async def pre_connect(self) -> None: | ||
user = self.scope["user"] | ||
if not user.is_staff: | ||
await self.close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a problem: how to return in the parent function to not execute the next code instructions?
I'm unsure about this. If you need to extend more behaviour, maybe just replacing the method and calling |
Hi @stefanw , the idea here is to create hooks to prevent the developer from having to overwrite/understand some implementations, it would be an "additional feature" Thinking about features, it would be something similar to Hocuspocus server Hooks, https://tiptap.dev/hocuspocus/server/hooks |
The idea of this PR:
It's creating hooks, to avoid overwriting all hook actions and thus not wanting to overwrite something vital for the operation.