mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Rename createImporter to createAttachmentDataWriter
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user