Skip to content
This repository
Browse code

room announcement update to support socket 0.7

  • Loading branch information...
commit 43b0f03fd26b8367c3be52333f42767b4b518fb4 1 parent 0e164fc
authored September 24, 2011

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. 8  lib/rooms.js
8  lib/rooms.js
@@ -144,7 +144,7 @@ exports.add_to_room_and_announce = function (client, room, msg) {
144 144
 		    for (var i = 0; i < clients.length; i++)
145 145
 			{
146 146
 				if (clients[i].id != client.id)
147  
-					clients[i].send(msg);
  147
+					clients[i].json.send(msg);
148 148
 			}
149 149
 		});
150 150
 }
@@ -171,7 +171,7 @@ exports.remove_from_all_rooms_and_announce = function (client, msg) {
171 171
 	    for (var i = 0; i < clients.length; i++)
172 172
 		{
173 173
 			if (clients[i].id != client.id)
174  
-				clients[i].send(msg);
  174
+				clients[i].json.send(msg);
175 175
 		}
176 176
 	});
177 177
 }
@@ -192,7 +192,7 @@ exports.broadcast = function(msg) {
192 192
 exports.broadcast_room = function(room, msg) {
193 193
     var clients = exports.room_clients(room);
194 194
     for (var i = 0; i < clients.length; i++)
195  
-	clients[i].send(msg);
  195
+	clients[i].json.send(msg);
196 196
 };
197 197
 
198 198
 // 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) {
224 224
    for (var i = 0; i < roommates.length; i++)
225 225
 	{
226 226
 		console.log('  - ' + roommates[i].id);
227  
-		roommates[i].send(msg);
  227
+		roommates[i].json.send(msg);
228 228
 	}
229 229
 }

0 notes on commit 43b0f03

Please sign in to comment.
Something went wrong with that request. Please try again.