Add getAbsoluteAttachmentPath
This commit is contained in:
parent
e2a2165d9c
commit
f56dc09d01
2 changed files with 6 additions and 0 deletions
|
@ -123,3 +123,7 @@ exports.getRelativePath = (name) => {
|
|||
const prefix = name.slice(0, 2);
|
||||
return path.join(prefix, name);
|
||||
};
|
||||
|
||||
// createAbsolutePathGetter :: RoothPath -> RelativePath -> AbsolutePath
|
||||
exports.createAbsolutePathGetter = rootPath => relativePath =>
|
||||
path.join(rootPath, relativePath);
|
||||
|
|
|
@ -136,6 +136,7 @@ window.moment.locale(locale);
|
|||
|
||||
// ES2015+ modules
|
||||
const attachmentsPath = Attachments.getPath(app.getPath('userData'));
|
||||
const getAbsoluteAttachmentPath = Attachments.createAbsolutePathGetter(attachmentsPath);
|
||||
const deleteAttachmentData = Attachments.createDeleter(attachmentsPath);
|
||||
const readAttachmentData = Attachments.createReader(attachmentsPath);
|
||||
const writeNewAttachmentData = Attachments.createWriterForNew(attachmentsPath);
|
||||
|
@ -187,6 +188,7 @@ window.Signal.Migrations.deleteAttachmentData =
|
|||
window.Signal.Migrations.getPlaceholderMigrations = getPlaceholderMigrations;
|
||||
window.Signal.Migrations.writeMessageAttachments =
|
||||
Message.createAttachmentDataWriter(writeExistingAttachmentData);
|
||||
window.Signal.Migrations.getAbsoluteAttachmentPath = getAbsoluteAttachmentPath;
|
||||
window.Signal.Migrations.loadAttachmentData = loadAttachmentData;
|
||||
window.Signal.Migrations.loadMessage = Message.createAttachmentLoader(loadAttachmentData);
|
||||
window.Signal.Migrations.Migrations0DatabaseWithAttachmentData =
|
||||
|
|
Loading…
Add table
Reference in a new issue