diff --git a/doc/api/hooks_server-side.md b/doc/api/hooks_server-side.md index 23428eb4e..02c7e2fe6 100644 --- a/doc/api/hooks_server-side.md +++ b/doc/api/hooks_server-side.md @@ -819,6 +819,7 @@ Context properties: * `destFile`: The destination HTML filename. * `fileEnding`: The lower-cased filename extension from `srcFile`. +* `padId`: The identifier of the destination pad. * `srcFile`: The document to convert. ## `userJoin` diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index 7e3313524..c865dcf98 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -143,7 +143,7 @@ const doImport = async (req, res, padId) => { const destFile = path.join(tmpDirectory, `etherpad_import_${randNum}.${exportExtension}`); const importHandledByPlugin = - (await hooks.aCallAll('import', {srcFile, destFile, fileEnding})).some((x) => x); + (await hooks.aCallAll('import', {srcFile, destFile, fileEnding, padId})).some((x) => x); const fileIsEtherpad = (fileEnding === '.etherpad'); const fileIsHTML = (fileEnding === '.html' || fileEnding === '.htm'); const fileIsTXT = (fileEnding === '.txt');