Fix example with custom channel

This commit is contained in:
Andrew Godwin 2016-04-06 08:11:59 -07:00
parent c171cb4346
commit 609adfca8d

View File

@ -569,7 +569,7 @@ have a ChatMessage model with ``message`` and ``room`` fields::
) )
# Broadcast to listening sockets # Broadcast to listening sockets
Group("chat-%s" % room).send({ Group("chat-%s" % room).send({
"content": message.content['message'], "text": message.content['message'],
}) })
# Connected to websocket.connect # Connected to websocket.connect
@ -587,7 +587,7 @@ have a ChatMessage model with ``message`` and ``room`` fields::
# Stick the message onto the processing queue # Stick the message onto the processing queue
Channel("chat-messages").send({ Channel("chat-messages").send({
"room": channel_session['room'], "room": channel_session['room'],
"message": content, "message": message['text'],
}) })
# Connected to websocket.disconnect # Connected to websocket.disconnect