mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 08:26:16 -04:00
ExportEtherpad: Fix exportEtherpadAdditionalContent
hook docs
When exporting, only records like `comments:padId` are supported, not records like `comments:padId:foo`.
This commit is contained in:
parent
936185e3b6
commit
78b44daaa8
2 changed files with 11 additions and 11 deletions
|
@ -32,8 +32,6 @@ exports.getPadRaw = async (padId, readOnlyId) => {
|
|||
}
|
||||
for (let i = 0; i <= pad.head; ++i) data[`${pfx}:revs:${i}`] = await pad.getRevision(i);
|
||||
for (let i = 0; i <= pad.chatHead; ++i) data[`${pfx}:chat:${i}`] = await pad.getChatMessage(i);
|
||||
// get content that has a different prefix IE comments:padId:foo
|
||||
// a plugin would return something likle ['comments', 'cakes']
|
||||
const prefixes = await hooks.aCallAll('exportEtherpadAdditionalContent');
|
||||
await Promise.all(prefixes.map(async (prefix) => {
|
||||
data[`${prefix}:${readOnlyId || padId}`] = await pad.db.get(`${prefix}:${padId}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue