mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Pad: New padCheck
hook
This commit is contained in:
parent
a2460a9848
commit
f9610452cf
3 changed files with 15 additions and 0 deletions
|
@ -40,6 +40,7 @@
|
||||||
|
|
||||||
* New `expressPreSession` server-side hook.
|
* New `expressPreSession` server-side hook.
|
||||||
* Pad server-side hook changes:
|
* Pad server-side hook changes:
|
||||||
|
* `padCheck`: New hook.
|
||||||
* `padCopy`: New `srcPad` and `dstPad` context properties.
|
* `padCopy`: New `srcPad` and `dstPad` context properties.
|
||||||
* `padDefaultContent`: New hook.
|
* `padDefaultContent`: New hook.
|
||||||
* `padRemove`: New `pad` context property.
|
* `padRemove`: New `pad` context property.
|
||||||
|
|
|
@ -366,6 +366,18 @@ Usage examples:
|
||||||
|
|
||||||
* https://github.com/ether/ep_comments_page
|
* https://github.com/ether/ep_comments_page
|
||||||
|
|
||||||
|
## `padCheck`
|
||||||
|
|
||||||
|
Called from: `src/node/db/Pad.js`
|
||||||
|
|
||||||
|
Called when a consistency check is run on a pad, after the core checks have
|
||||||
|
completed successfully. An exception should be thrown if the pad is faulty in
|
||||||
|
some way.
|
||||||
|
|
||||||
|
Context properties:
|
||||||
|
|
||||||
|
* `pad`: The Pad object that is being checked.
|
||||||
|
|
||||||
## socketio
|
## socketio
|
||||||
Called from: src/node/hooks/express/socketio.js
|
Called from: src/node/hooks/express/socketio.js
|
||||||
|
|
||||||
|
|
|
@ -738,4 +738,6 @@ Pad.prototype.check = async function () {
|
||||||
err.message = pfx + err.message;
|
err.message = pfx + err.message;
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
await hooks.aCallAll('padCheck', {pad: this});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue