mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
Merge pull request #1057 from dmitryuv/sync-processing
fix for error handling in the callback code
This commit is contained in:
commit
bedc51d2e3
1 changed files with 3 additions and 1 deletions
|
@ -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
|
// 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
|
// 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){
|
_.each(messages, function(newMessage){
|
||||||
if ( newMessage === null ) {
|
if ( newMessage === null ) {
|
||||||
dropMessage = true;
|
dropMessage = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue