mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
PadMessageHandler: Invert logic to improve readability
This commit is contained in:
parent
d4db091d1d
commit
7f0770d684
1 changed files with 37 additions and 37 deletions
|
@ -260,7 +260,8 @@ exports.handleMessage = async function(client, message)
|
|||
}
|
||||
|
||||
let dropMessage = await handleMessageHook();
|
||||
if (!dropMessage) {
|
||||
if (dropMessage) return;
|
||||
|
||||
if (message.type == "CLIENT_READY") {
|
||||
// client tried to auth for the first time (first msg from the client)
|
||||
createSessionInfo(client, message);
|
||||
|
@ -298,7 +299,6 @@ exports.handleMessage = async function(client, message)
|
|||
|
||||
// access was granted
|
||||
finalHandler();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue