diff --git a/CHANGELOG.md b/CHANGELOG.md index a7a991ef5..b6db5e47b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/node/db/Pad.js b/src/node/db/Pad.js index 8e824eaac..62baf1a9e 100644 --- a/src/node/db/Pad.js +++ b/src/node/db/Pad.js @@ -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) {