Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
squirrelo committed Jul 1, 2014
1 parent 2d196f6 commit dcfb331
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions qiita_pet/handlers/websocket_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def get_current_user(self):
def on_message(self, msg):
msginfo = loads(msg)
# listens for handshake from page
if "user:" in msginfo['msg']:
self.channel = msginfo['msg'].split(':')[1]
if "user" in msginfo:
self.channel = msginfo['user']
# need to split the rest off to new func so it can be asynchronous
self.listen()

Expand Down
4 changes: 2 additions & 2 deletions qiita_pet/templates/analysis_waiting.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
noerror = true;

websocket.onopen = function() {
websocket.send(JSON.stringify({'msg': 'user:{{user}}'}));
console.log(JSON.stringify({'msg':'user:{{user}}'}));
websocket.send(JSON.stringify({'user': '{{user}}'}));
console.log(JSON.stringify({'user':'{{user}}'}));
};
websocket.onmessage = function(evt) {
console.log(evt.data);
Expand Down

0 comments on commit dcfb331

Please sign in to comment.