room announcement update to support socket 0.7
This commit is contained in:
parent
0e164fce74
commit
43b0f03fd2
1 changed files with 4 additions and 4 deletions
|
@ -144,7 +144,7 @@ exports.add_to_room_and_announce = function (client, room, msg) {
|
|||
for (var i = 0; i < clients.length; i++)
|
||||
{
|
||||
if (clients[i].id != client.id)
|
||||
clients[i].send(msg);
|
||||
clients[i].json.send(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ exports.remove_from_all_rooms_and_announce = function (client, msg) {
|
|||
for (var i = 0; i < clients.length; i++)
|
||||
{
|
||||
if (clients[i].id != client.id)
|
||||
clients[i].send(msg);
|
||||
clients[i].json.send(msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ exports.broadcast = function(msg) {
|
|||
exports.broadcast_room = function(room, msg) {
|
||||
var clients = exports.room_clients(room);
|
||||
for (var i = 0; i < clients.length; i++)
|
||||
clients[i].send(msg);
|
||||
clients[i].json.send(msg);
|
||||
};
|
||||
|
||||
// Broadcast message to all the other clients that are in rooms with this client
|
||||
|
@ -224,6 +224,6 @@ exports.broadcast_to_roommates = function (client, msg) {
|
|||
for (var i = 0; i < roommates.length; i++)
|
||||
{
|
||||
console.log(' - ' + roommates[i].id);
|
||||
roommates[i].send(msg);
|
||||
roommates[i].json.send(msg);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue