mirror of
https://github.com/django/daphne.git
synced 2025-07-13 09:22:17 +03:00
Fix typo in code in models section (#319)
Changed channel_session['room'] inside websockets consumer function to message.channel_session['room']
This commit is contained in:
parent
5464cba742
commit
d1590afdcb
|
@ -595,7 +595,7 @@ have a ChatMessage model with ``message`` and ``room`` fields::
|
|||
def ws_message(message):
|
||||
# Stick the message onto the processing queue
|
||||
Channel("chat-messages").send({
|
||||
"room": channel_session['room'],
|
||||
"room": message.channel_session['room'],
|
||||
"message": message['text'],
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user