mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 22:23:33 +01:00
Merge pull request #1699 from ether/fix-custom
Fix custom obj msg broadcaster to pads
This commit is contained in:
commit
f503f28b08
1 changed files with 1 additions and 2 deletions
|
@ -151,7 +151,6 @@ exports.handleMessage = function(client, message)
|
||||||
|
|
||||||
var handleMessageHook = function(callback){
|
var handleMessageHook = function(callback){
|
||||||
var dropMessage = false;
|
var dropMessage = false;
|
||||||
|
|
||||||
// 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 ( err, messages ) {
|
hooks.aCallAll("handleMessage", { client: client, message: message }, function ( err, messages ) {
|
||||||
|
@ -265,7 +264,7 @@ exports.handleCustomObjectMessage = function (msg, sessionID, cb) {
|
||||||
if(sessionID){ // If a sessionID is targeted then send directly to this sessionID
|
if(sessionID){ // If a sessionID is targeted then send directly to this sessionID
|
||||||
socketio.sockets.socket(sessionID).json.send(msg); // send a targeted message
|
socketio.sockets.socket(sessionID).json.send(msg); // send a targeted message
|
||||||
}else{
|
}else{
|
||||||
socketio.sockets.in(msg.data.padId).json.send(msg); // broadcast to all clients on this pad
|
socketio.sockets.in(msg.data.payload.padId).json.send(msg); // broadcast to all clients on this pad
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cb(null, {});
|
cb(null, {});
|
||||||
|
|
Loading…
Reference in a new issue