mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-19 06:03:34 +01:00
Pad: New padRemove
hook pad
context property
This commit is contained in:
parent
8fe779b58c
commit
a2460a9848
3 changed files with 11 additions and 2 deletions
|
@ -42,6 +42,7 @@
|
|||
* Pad server-side hook changes:
|
||||
* `padCopy`: New `srcPad` and `dstPad` context properties.
|
||||
* `padDefaultContent`: New hook.
|
||||
* `padRemove`: New `pad` context property.
|
||||
* The `db` property on Pad objects is now public.
|
||||
* New `getAuthorId` server-side hook.
|
||||
* New APIs for processing attributes: `ep_etherpad-lite/static/js/attributes`
|
||||
|
@ -74,6 +75,8 @@
|
|||
instead.
|
||||
* `padCreate`: The `author` context property is deprecated; use the new
|
||||
`authorId` context property instead.
|
||||
* `padRemove`: The `padID` context property is deprecated; use `pad.id`
|
||||
instead.
|
||||
* `padUpdate`: The `author` context property is deprecated; use the new
|
||||
`authorId` context property instead.
|
||||
* Returning `true` from a `handleMessageSecurity` hook function is deprecated;
|
||||
|
|
|
@ -360,7 +360,7 @@ up any plugin-specific pad records from the database.
|
|||
|
||||
Context properties:
|
||||
|
||||
* `padID`: ID of the pad that is being deleted.
|
||||
* `pad`: Pad object for the pad that is being deleted.
|
||||
|
||||
Usage examples:
|
||||
|
||||
|
|
|
@ -594,7 +594,13 @@ Pad.prototype.remove = async function () {
|
|||
|
||||
// delete the pad entry and delete pad from padManager
|
||||
p.push(padManager.removePad(padID));
|
||||
p.push(hooks.aCallAll('padRemove', {padID}));
|
||||
p.push(hooks.aCallAll('padRemove', {
|
||||
get padID() {
|
||||
warnDeprecated('padRemove padID context property is deprecated; use pad.id instead');
|
||||
return this.pad.id;
|
||||
},
|
||||
pad: this,
|
||||
}));
|
||||
await Promise.all(p);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue