Rename createImporter
to createAttachmentDataWriter
This commit is contained in:
parent
5ea1a305a6
commit
4c4443390a
4 changed files with 15 additions and 12 deletions
|
@ -824,9 +824,9 @@ async function saveAllMessages(db, rawMessages) {
|
|||
return Promise.resolve();
|
||||
}
|
||||
|
||||
const { importMessage, upgradeMessageSchema } = Signal.Migrations;
|
||||
const { writeMessageAttachments, upgradeMessageSchema } = Signal.Migrations;
|
||||
const importAndUpgrade = async message =>
|
||||
upgradeMessageSchema(await importMessage(message));
|
||||
upgradeMessageSchema(await writeMessageAttachments(message));
|
||||
|
||||
const messages = await Promise.all(rawMessages.map(importAndUpgrade));
|
||||
|
||||
|
|
|
@ -187,10 +187,10 @@ exports.createAttachmentLoader = (loadAttachmentData) => {
|
|||
}));
|
||||
};
|
||||
|
||||
// createImporter :: (RelativePath -> IO Unit)
|
||||
// Message ->
|
||||
// IO (Promise Message)
|
||||
exports.createImporter = (writeExistingAttachmentData) => {
|
||||
// createAttachmentDataWriter :: (RelativePath -> IO Unit)
|
||||
// Message ->
|
||||
// IO (Promise Message)
|
||||
exports.createAttachmentDataWriter = (writeExistingAttachmentData) => {
|
||||
if (!isFunction(writeExistingAttachmentData)) {
|
||||
throw new TypeError('"writeExistingAttachmentData" must be a function');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue