Merge branch 'doc-update'

This commit is contained in:
Faris Chebib 2015-09-10 16:58:03 -06:00
commit 231f87b500
2 changed files with 3 additions and 3 deletions

View File

@ -50,8 +50,8 @@ def channel_session(func):
# Turn the reply_channel into a valid session key length thing.
# We take the last 24 bytes verbatim, as these are the random section,
# and then hash the remaining ones onto the start, and add a prefix
reply_name = message.reply_channel.name
session_key = "skt" + hashlib.md5(reply_name[:-24]).hexdigest()[:8] + reply_name[-24:]
reply_name = str(message.reply_channel.name).encode()
session_key = b"skt" + str(hashlib.md5(reply_name[:-24]).hexdigest()[:8]).encode() + reply_name[-24:]
# Make a session storage
session_engine = import_module(settings.SESSION_ENGINE)
session = session_engine.SessionStore(session_key=session_key)

View File

@ -267,7 +267,7 @@ name in the path of your WebSocket request (we'll ignore auth for now - that's n
# Connected to websocket.keepalive
@channel_session
def ws_add(message):
def ws_keepalive(message):
Group("chat-%s" % message.channel_session['room']).add(message.reply_channel)
# Connected to websocket.receive