mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 09:56:15 -04:00
chat: Move chatHead
client var to clientVars
hook
This commit is contained in:
parent
8d5fdd7dc9
commit
2e684476cb
5 changed files with 14 additions and 4 deletions
|
@ -23,6 +23,8 @@ const sendChatMessageToPadClients = async (message, padId) => {
|
|||
await promise;
|
||||
};
|
||||
|
||||
exports.clientVars = (hookName, {pad: {chatHead}}) => ({chatHead});
|
||||
|
||||
exports.eejsBlock_mySettings = (hookName, context) => {
|
||||
context.content += `
|
||||
<p class="hide-for-mobile">
|
||||
|
|
|
@ -903,9 +903,6 @@ const handleClientReady = async (socket, message) => {
|
|||
padShortcutEnabled: settings.padShortcutEnabled,
|
||||
initialTitle: `Pad: ${sessionInfo.auth.padID}`,
|
||||
opts: {},
|
||||
// tell the client the number of the latest chat-message, which will be
|
||||
// used to request the latest 100 chat-messages later (GET_CHAT_MESSAGES)
|
||||
chatHead: pad.chatHead,
|
||||
numConnectedUsers: roomSockets.length,
|
||||
readOnlyId: sessionInfo.readOnlyPadId,
|
||||
readonly: sessionInfo.readonly,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue