plugins: include more data within padUpdate hook (#4425)
* Including more data at pad update event * docs: new context fields in padUpdate Co-authored-by: Pedro Beschorner Marin <pedrobmarin@gmail.com>pull/4423/head
parent
1e7a9e1791
commit
94cb000e8f
|
@ -169,6 +169,8 @@ Things in context:
|
|||
|
||||
1. pad - the pad instance
|
||||
2. author - the id of the author who updated the pad
|
||||
3. newRev - the index of the new revision
|
||||
4. changeset - the changeset of this revision (see [Changeset Library](#index_changeset_library))
|
||||
|
||||
This hook gets called when an existing pad was updated.
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ Pad.prototype.appendRevision = async function appendRevision(aChangeset, author)
|
|||
if (this.head == 0) {
|
||||
hooks.callAll("padCreate", {'pad':this, 'author': author});
|
||||
} else {
|
||||
hooks.callAll("padUpdate", {'pad':this, 'author': author});
|
||||
hooks.callAll("padUpdate", {'pad':this, 'author': author, 'revs': newRev, 'changeset': aChangeset});
|
||||
}
|
||||
|
||||
await Promise.all(p);
|
||||
|
|
Loading…
Reference in New Issue