Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mdietz94 committed Jan 23, 2015
1 parent 1a82397 commit 15b6a58
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tp6/src/script/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@
var _this = this;
this.websock = new Tp.Websock();
this.websock.bind("message", function(msg) {
if (!msg.room || msg.room == parse('room_id')) {
return _this.handle_msg(msg);
}
return null;
return _this.handle_msg(msg);
});
this.websock.bind("disconnected", function() {
return $('#lost-connection').show();
Expand Down Expand Up @@ -136,10 +133,12 @@
case "connection":
return this.connected(msg);
case "state_changed":
if (msg['resource'] === 'source') {
return this.source_changed(msg);
} else {
return this.device_changed(msg);
if (msg['room'] === parse('room_id')) {
if (msg['resource'] === 'source') {
return this.source_changed(msg);
} else {
return this.device_changed(msg);
}
}
break;
case "ack":
Expand Down

0 comments on commit 15b6a58

Please sign in to comment.