Pad: Run `padLoad` hook asynchronously

pull/5505/head
Richard Hansen 2022-04-08 03:18:47 -04:00
parent b38d66b30b
commit 07146591dd
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -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) {