mirror of
https://github.com/django/daphne.git
synced 2025-04-20 16:52:03 +03:00
Fix example with custom channel
This commit is contained in:
parent
c171cb4346
commit
609adfca8d
|
@ -569,7 +569,7 @@ have a ChatMessage model with ``message`` and ``room`` fields::
|
|||
)
|
||||
# Broadcast to listening sockets
|
||||
Group("chat-%s" % room).send({
|
||||
"content": message.content['message'],
|
||||
"text": message.content['message'],
|
||||
})
|
||||
|
||||
# Connected to websocket.connect
|
||||
|
@ -587,7 +587,7 @@ have a ChatMessage model with ``message`` and ``room`` fields::
|
|||
# Stick the message onto the processing queue
|
||||
Channel("chat-messages").send({
|
||||
"room": channel_session['room'],
|
||||
"message": content,
|
||||
"message": message['text'],
|
||||
})
|
||||
|
||||
# Connected to websocket.disconnect
|
||||
|
|
Loading…
Reference in New Issue
Block a user