You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to channels, I've tried to follow the readme to the letter, but I still haven't managed to solve part of the problem.
My goal is simple, "I want to have the ability, to receive messages in real time for the logged in user."
To give you some context, let me share with you my current code:
Question :
1 - in @message_activity.groups_for_consumer decorator I tried to use self.scope like mentioned on the documentation, but it doesn't seem to work (maybe the doc isn't up to date?).
2 - The big issue for me : How to make unsubscribe_from_send_messages work, am I making a mistake somewhere?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone,
I'm new to channels, I've tried to follow the readme to the letter, but I still haven't managed to solve part of the problem.
My goal is simple, "I want to have the ability, to receive messages in real time for the logged in user."
To give you some context, let me share with you my current code:
Actions :
subscribe_to_send_messages
works perfectly 👌unsubscribe_from_send_messages
doesn't work 🙁Question :
1 - in
@message_activity.groups_for_consumer
decorator I tried to useself.scope
like mentioned on the documentation, but it doesn't seem to work (maybe the doc isn't up to date?).2 - The big issue for me : How to make
unsubscribe_from_send_messages
work, am I making a mistake somewhere?Thanks in advance for your help 🙏
Sources:
https://djangochannelsrestframework.readthedocs.io/en/latest/examples/filtered_model_observer.html
https://nilcoalescing.com/blog/BuildingARealtimeSocialNetworkUsingDjangoChannels/
Beta Was this translation helpful? Give feedback.
All reactions