mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
chat: Move chatHead
initialization to padLoad
hook
This commit is contained in:
parent
42c22ce28d
commit
01f1a8b75e
3 changed files with 5 additions and 1 deletions
|
@ -26,6 +26,7 @@
|
|||
"eejsBlock_stickyContainer": "ep_etherpad-lite/node/chat",
|
||||
"handleMessage": "ep_etherpad-lite/node/chat",
|
||||
"padCheck": "ep_etherpad-lite/node/chat",
|
||||
"padLoad": "ep_etherpad-lite/node/chat",
|
||||
"socketio": "ep_etherpad-lite/node/chat"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -156,6 +156,10 @@ exports.padCheck = async (hookName, {pad}) => {
|
|||
for (const p of chats.batch(100).buffer(99)) await p;
|
||||
};
|
||||
|
||||
exports.padLoad = async (hookName, {pad}) => {
|
||||
if (!('chatHead' in pad)) pad.chatHead = -1;
|
||||
};
|
||||
|
||||
exports.socketio = (hookName, {io}) => {
|
||||
socketio = io;
|
||||
};
|
||||
|
|
|
@ -49,7 +49,6 @@ class Pad {
|
|||
this.atext = Changeset.makeAText('\n');
|
||||
this.pool = new AttributePool();
|
||||
this.head = -1;
|
||||
this.chatHead = -1;
|
||||
this.publicStatus = false;
|
||||
this.id = id;
|
||||
this.savedRevisions = [];
|
||||
|
|
Loading…
Reference in a new issue