Pad: Run `padLoad` hook asynchronously
parent
b38d66b30b
commit
07146591dd
|
@ -77,6 +77,7 @@
|
|||
* `padCreate`: The `author` context property is deprecated; use the new
|
||||
`authorId` context property instead.
|
||||
* `padLoad`: Now runs when a temporary Pad object is created during import.
|
||||
Also, it now runs asynchronously.
|
||||
* `padRemove`: The `padID` context property is deprecated; use `pad.id`
|
||||
instead.
|
||||
* `padUpdate`: The `author` context property is deprecated; use the new
|
||||
|
|
|
@ -395,7 +395,7 @@ Pad.prototype.init = async function (text, authorId = '') {
|
|||
const firstChangeset = Changeset.makeSplice('\n', 0, 0, text);
|
||||
await this.appendRevision(firstChangeset, authorId);
|
||||
}
|
||||
hooks.callAll('padLoad', {pad: this});
|
||||
await hooks.aCallAll('padLoad', {pad: this});
|
||||
};
|
||||
|
||||
Pad.prototype.copy = async function (destinationID, force) {
|
||||
|
|
Loading…
Reference in New Issue