mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 01:16:15 -04:00
[feat] New server-side hook: padCopy
Let plugins know when a pad is copied.
This commit is contained in:
parent
8345fd1539
commit
fc89034a55
2 changed files with 24 additions and 1 deletions
|
@ -592,6 +592,11 @@ Pad.prototype.copy = function copy(destinationID, force, callback) {
|
|||
setTimeout(function(){
|
||||
padManager.getPad(destinationID, null, callback) // this runs too early.
|
||||
},10);
|
||||
},
|
||||
// let the plugins know the pad was copied
|
||||
function(callback) {
|
||||
hooks.callAll('padCopy', { 'originalPad': _this, 'destinationID': destinationID });
|
||||
callback();
|
||||
}
|
||||
// series
|
||||
], function(err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue