PadMessageHandler: Modernize userLeave hook context properties

This commit is contained in:
Richard Hansen 2021-10-30 02:22:15 -04:00
parent a6d060d67b
commit 9aaf781548
3 changed files with 15 additions and 13 deletions

View file

@ -150,7 +150,12 @@ exports.handleDisconnect = async (socket) => {
},
},
});
await hooks.aCallAll('userLeave', session);
await hooks.aCallAll('userLeave', {
...session, // For backwards compatibility.
authorId: session.author,
readOnly: session.readonly,
socket,
});
};
/**