fix for error handling in callback code
The callback code does not follow error handling guidelines, thus always receiving NULL instead of results array.
This commit is contained in:
parent
e0d4a16208
commit
8ea3ee080f
|
@ -176,7 +176,9 @@ exports.handleMessage = function(client, message)
|
|||
|
||||
// Call handleMessage hook. If a plugin returns null, the message will be dropped. Note that for all messages
|
||||
// handleMessage will be called, even if the client is not authorized
|
||||
hooks.aCallAll("handleMessage", { client: client, message: message }, function ( messages ) {
|
||||
hooks.aCallAll("handleMessage", { client: client, message: message }, function ( err, messages ) {
|
||||
if(ERR(err, callback)) return;
|
||||
|
||||
_.each(messages, function(newMessage){
|
||||
if ( newMessage === null ) {
|
||||
dropMessage = true;
|
||||
|
|
Loading…
Reference in New Issue