Permalink
Browse files

changed indent

  • Loading branch information...
1 parent 0a3041e commit 7e98cb5501d759385207049734dc700f97247587 @jeromeetienne committed Mar 20, 2013
Showing with 26 additions and 26 deletions.
  1. +26 −26 lib/server.js
View
@@ -12,39 +12,39 @@ app.use('/', express.static(__dirname + '/../'));
webRTC.rtc.on('connect', function(rtc) {
- //Client connected
+ //Client connected
});
webRTC.rtc.on('send answer', function(rtc) {
- //answer sent
+ //answer sent
});
webRTC.rtc.on('disconnect', function(rtc) {
- //Client disconnect
+ //Client disconnect
});
webRTC.rtc.on('chat_msg', function(data, socket) {
- var roomList = webRTC.rtc.rooms[data.room] || [];
-
- for (var i = 0; i < roomList.length; i++) {
- var socketId = roomList[i];
-
- if (socketId !== socket.id) {
- var soc = webRTC.rtc.getSocket(socketId);
-
- if (soc) {
- soc.send(JSON.stringify({
- "eventName": "receive_chat_msg",
- "data": {
- "messages": data.messages,
- "color": data.color
- }
- }), function(error) {
- if (error) {
- console.log(error);
- }
- });
- }
- }
- }
+ var roomList = webRTC.rtc.rooms[data.room] || [];
+
+ for (var i = 0; i < roomList.length; i++) {
+ var socketId = roomList[i];
+
+ if (socketId !== socket.id) {
+ var soc = webRTC.rtc.getSocket(socketId);
+
+ if (soc) {
+ soc.send(JSON.stringify({
+ "eventName": "receive_chat_msg",
+ "data": {
+ "messages": data.messages,
+ "color": data.color
+ }
+ }), function(error) {
+ if (error) {
+ console.log(error);
+ }
+ });
+ }
+ }
+ }
});

0 comments on commit 7e98cb5

Please sign in to comment.