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
Originally posted by Ilyes-git January 28, 2024
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:
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?
Discussed in #196
Originally posted by Ilyes-git January 28, 2024
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/
The text was updated successfully, but these errors were encountered: