mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -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();
|
let dropMessage = await handleMessageHook();
|
||||||
if (!dropMessage) {
|
if (dropMessage) return;
|
||||||
|
|
||||||
if (message.type == "CLIENT_READY") {
|
if (message.type == "CLIENT_READY") {
|
||||||
// client tried to auth for the first time (first msg from the client)
|
// client tried to auth for the first time (first msg from the client)
|
||||||
createSessionInfo(client, message);
|
createSessionInfo(client, message);
|
||||||
|
@ -299,7 +300,6 @@ exports.handleMessage = async function(client, message)
|
||||||
// access was granted
|
// access was granted
|
||||||
finalHandler();
|
finalHandler();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue