mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 14:13:34 +01:00
Fixed the AttributePool Bug
This commit is contained in:
parent
b7c58a5e09
commit
82e7fda80e
1 changed files with 8 additions and 4 deletions
|
@ -182,6 +182,11 @@ function handleUserInfoUpdate(client, message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function errlog(name, value)
|
||||||
|
{
|
||||||
|
console.error(name+"=" + JSON.stringify(value));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles a USERINFO_UPDATE, that means that a user have changed his color or name. Anyway, we get both informations
|
* Handles a USERINFO_UPDATE, that means that a user have changed his color or name. Anyway, we get both informations
|
||||||
* This Method is nearly 90% copied out of the Etherpad Source Code. So I can't tell you what happens here exactly
|
* This Method is nearly 90% copied out of the Etherpad Source Code. So I can't tell you what happens here exactly
|
||||||
|
@ -224,7 +229,7 @@ function handleUserChanges(client, message)
|
||||||
//ex. adoptChangesetAttribs
|
//ex. adoptChangesetAttribs
|
||||||
|
|
||||||
//Afaik, it copies the new attributes from the changeset, to the global Attribute Pool
|
//Afaik, it copies the new attributes from the changeset, to the global Attribute Pool
|
||||||
Changeset.moveOpsToNewPool(changeset, wireApool, pad.pool());
|
changeset = Changeset.moveOpsToNewPool(changeset, wireApool, pad.pool());
|
||||||
|
|
||||||
//ex. applyUserChanges
|
//ex. applyUserChanges
|
||||||
|
|
||||||
|
@ -258,8 +263,6 @@ function handleUserChanges(client, message)
|
||||||
pad.appendRevision(nlChangeset);
|
pad.appendRevision(nlChangeset);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.error(JSON.stringify(pad.pool()));
|
|
||||||
|
|
||||||
//ex. updatePadClients
|
//ex. updatePadClients
|
||||||
|
|
||||||
for(i in pad2sessions[pad.id])
|
for(i in pad2sessions[pad.id])
|
||||||
|
@ -283,6 +286,7 @@ function handleUserChanges(client, message)
|
||||||
changeset: forWire.translated,
|
changeset: forWire.translated,
|
||||||
apool: forWire.pool,
|
apool: forWire.pool,
|
||||||
author: author}};
|
author: author}};
|
||||||
|
|
||||||
socketio.clients[session].send(wireMsg);
|
socketio.clients[session].send(wireMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue