PadMessageHandler: Delete redundant check

This check is already made very early in `handleMessage`.
This commit is contained in:
Richard Hansen 2020-09-04 22:45:55 -04:00 committed by John McLear
parent d4162341e7
commit 17096919e0

View file

@ -259,19 +259,6 @@ exports.handleMessage = async function(client, message)
}
}
/*
* In a previous version of this code, an "if (message)" wrapped the
* following series of async calls [now replaced with await calls]
* This ugly "!Boolean(message)" is a lame way to exactly negate the truthy
* condition and replace it with an early return, while being sure to leave
* the original behaviour unchanged.
*
* A shallower code could maybe make more evident latent logic errors.
*/
if (!Boolean(message)) {
return;
}
let dropMessage = await handleMessageHook();
if (!dropMessage) {