ExportEtherpad: New importEtherpad, exportEtherpad hooks

This commit is contained in:
Richard Hansen 2022-04-19 17:01:35 -04:00
parent 44fd70491d
commit 2facf3a0c5
4 changed files with 57 additions and 1 deletions

View file

@ -55,5 +55,10 @@ exports.getPadRaw = async (padId, readOnlyId) => {
})();
const data = {[dstPfx]: pad};
for (const [dstKey, p] of new Stream(records).batch(100).buffer(99)) data[dstKey] = await p;
await hooks.aCallAll('exportEtherpad', {
pad,
data,
dstPadId: readOnlyId || padId,
});
return data;
};