NilCoalescing / djangochannelsrestframework

A Rest-framework for websockets using Django channels-v4

Home Page:https://djangochannelsrestframework.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question about client notify

tyctor opened this issue · comments

Hi

first thank you for this module.

I use @model_observer to notify clients about model changes
the message is sent to all clients,
is there some way to avoid sending the message to the client which made that change?
because that client has already received same data in the CRUD response

thanks for any hint

When I do this with bare django-channels, I generate a UUID in the connect() method and save it to the instances state (e.g. self.id). That way the session ID can be compared when sending responses and filtered to avoid looping back to the same client.