mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 14:47:12 -04:00
handler/SocketIORouter: use jshint
This commit is contained in:
parent
9c126674b3
commit
e7b2a2b3b9
1 changed files with 19 additions and 19 deletions
|
@ -43,7 +43,7 @@ exports.addComponent = function(moduleName, module)
|
||||||
|
|
||||||
//give the module the socket
|
//give the module the socket
|
||||||
module.setSocketIO(socket);
|
module.setSocketIO(socket);
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sets the socket.io and adds event functions for routing
|
* sets the socket.io and adds event functions for routing
|
||||||
|
@ -63,7 +63,7 @@ exports.setSocketIO = function(_socket)
|
||||||
{
|
{
|
||||||
messageLogger.info("to " + client.id + ": " + stringifyWithoutPassword(message));
|
messageLogger.info("to " + client.id + ": " + stringifyWithoutPassword(message));
|
||||||
client._send(message);
|
client._send(message);
|
||||||
}
|
};
|
||||||
|
|
||||||
//tell all components about this connect
|
//tell all components about this connect
|
||||||
for(var i in components)
|
for(var i in components)
|
||||||
|
@ -143,7 +143,7 @@ exports.setSocketIO = function(_socket)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
//returns a stringified representation of a message, removes the password
|
//returns a stringified representation of a message, removes the password
|
||||||
//this ensures there are no passwords in the log
|
//this ensures there are no passwords in the log
|
||||||
|
@ -153,8 +153,8 @@ function stringifyWithoutPassword(message)
|
||||||
|
|
||||||
for(var i in message)
|
for(var i in message)
|
||||||
{
|
{
|
||||||
if(i == "password" && message[i] != null)
|
if(i == "password" && message[i])
|
||||||
newMessage["password"] = "xxx";
|
newMessage.password = "xxx";
|
||||||
else
|
else
|
||||||
newMessage[i]=message[i];
|
newMessage[i]=message[i];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue