Unsubscribe from consumer issue #196
Unanswered
Ilyespes2017
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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