mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-20 14:39:53 +01:00
Merge pull request #1058 from Pita/release/releases-1.1.4
Release 1.1.4
This commit is contained in:
commit
e19c05d1c4
2 changed files with 23 additions and 9 deletions
|
@ -176,9 +176,11 @@ exports.handleMessage = function(client, message)
|
||||||
|
|
||||||
// Call handleMessage hook. If a plugin returns null, the message will be dropped. Note that for all messages
|
// Call handleMessage hook. If a plugin returns null, the message will be dropped. Note that for all messages
|
||||||
// handleMessage will be called, even if the client is not authorized
|
// handleMessage will be called, even if the client is not authorized
|
||||||
hooks.aCallAll("handleMessage", { client: client, message: message }, function ( messages ) {
|
hooks.aCallAll("handleMessage", { client: client, message: message }, function ( err, messages ) {
|
||||||
|
if(ERR(err, callback)) return;
|
||||||
|
|
||||||
_.each(messages, function(newMessage){
|
_.each(messages, function(newMessage){
|
||||||
if ( newmessage === null ) {
|
if ( newMessage === null ) {
|
||||||
dropMessage = true;
|
dropMessage = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -416,21 +418,33 @@ function handleUserInfoUpdate(client, message)
|
||||||
|
|
||||||
var padId = sessioninfos[client.id].padId;
|
var padId = sessioninfos[client.id].padId;
|
||||||
|
|
||||||
//set a null name, when there is no name set. cause the client wants it null
|
var infoMsg = {
|
||||||
if(message.data.userInfo.name == null)
|
type: "COLLABROOM",
|
||||||
{
|
data: {
|
||||||
message.data.userInfo.name = null;
|
// The Client doesn't know about USERINFO_UPDATE, use USER_NEWINFO
|
||||||
|
type: "USER_NEWINFO",
|
||||||
|
userInfo: {
|
||||||
|
userId: author,
|
||||||
|
name: message.data.userInfo.name,
|
||||||
|
colorId: message.data.userInfo.colorId,
|
||||||
|
userAgent: "Anonymous",
|
||||||
|
ip: "127.0.0.1",
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
//The Client don't know about a USERINFO_UPDATE, it can handle only new user_newinfo, so change the message type
|
//set a null name, when there is no name set. cause the client wants it null
|
||||||
message.data.type = "USER_NEWINFO";
|
if(infoMsg.data.userInfo.name == null)
|
||||||
|
{
|
||||||
|
infoMsg.data.userInfo.name = null;
|
||||||
|
}
|
||||||
|
|
||||||
//Send the other clients on the pad the update message
|
//Send the other clients on the pad the update message
|
||||||
for(var i in pad2sessions[padId])
|
for(var i in pad2sessions[padId])
|
||||||
{
|
{
|
||||||
if(pad2sessions[padId][i] != client.id)
|
if(pad2sessions[padId][i] != client.id)
|
||||||
{
|
{
|
||||||
socketio.sockets.sockets[pad2sessions[padId][i]].json.send(message);
|
socketio.sockets.sockets[pad2sessions[padId][i]].json.send(infoMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
"resolve" : "0.2.x",
|
"resolve" : "0.2.x",
|
||||||
"socket.io" : "0.9.x",
|
"socket.io" : "0.9.x",
|
||||||
"ueberDB" : "0.1.7",
|
"ueberDB" : "0.1.7",
|
||||||
"async" : "0.1.x",
|
"async" : "0.1.22",
|
||||||
"express" : "2.5.x",
|
"express" : "2.5.x",
|
||||||
"connect" : "1.x",
|
"connect" : "1.x",
|
||||||
"clean-css" : "0.3.2",
|
"clean-css" : "0.3.2",
|
||||||
|
|
Loading…
Reference in a new issue