stefanw / channels-yroom

Django Channels WebSocket consumer and worker for synchronizing Yjs clients
https://channels-yroom.readthedocs.io/en/latest/
MIT License
15 stars 5 forks source link

Create consumer hooks #3

Open linspw opened 1 year ago

linspw commented 1 year ago

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.

stefanw commented 1 year ago

I'm unsure about this. If you need to extend more behaviour, maybe just replacing the method and calling super() when needed works?

linspw commented 1 year ago

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