diff options
author | Luiza Pagliari <lpagliari@gmail.com> | 2017-05-18 18:52:14 -0300 |
---|---|---|
committer | Luiza Pagliari <lpagliari@gmail.com> | 2017-05-18 18:52:14 -0300 |
commit | fc89034a555d1708a70f5007b4e6c0bc2641d8a4 (patch) | |
tree | ce3d7966bb21788cbdb468b73ce647389ab6cb84 /src/node/db | |
parent | 8345fd15390499a170b524e43b60a088b83f823d (diff) | |
download | etherpad-lite-fc89034a555d1708a70f5007b4e6c0bc2641d8a4.zip |
[feat] New server-side hook: padCopy
Let plugins know when a pad is copied.
Diffstat (limited to 'src/node/db')
-rw-r--r-- | src/node/db/Pad.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/node/db/Pad.js b/src/node/db/Pad.js index 5d26f470..d44cb7b3 100644 --- a/src/node/db/Pad.js +++ b/src/node/db/Pad.js @@ -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) |