pluginfw: PadMessageHandler: Pass socket.io Socket object to clientVars hook (#4245)

Also revise the clientVars hook documentation.
This commit is contained in:
Richard Hansen 2020-09-05 05:51:39 -04:00 committed by GitHub
parent 4c0ab8a14e
commit f0b7dc7c53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 8 deletions

View file

@ -1168,7 +1168,7 @@ async function handleClientReady(client, message)
}
// call the clientVars-hook so plugins can modify them before they get sent to the client
let messages = await hooks.aCallAll("clientVars", { clientVars: clientVars, pad: pad });
let messages = await hooks.aCallAll('clientVars', {clientVars, pad, socket: client});
// combine our old object with the new attributes from the hook
for (let msg of messages) {