Avoid exposing AttachmentTS
This commit is contained in:
parent
86e48a5713
commit
d00fb560b0
3 changed files with 5 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
const is = require('@sindresorhus/is');
|
const is = require('@sindresorhus/is');
|
||||||
|
|
||||||
|
const AttachmentTS = require('../../../ts/types/Attachment');
|
||||||
const MIME = require('../../../ts/types/MIME');
|
const MIME = require('../../../ts/types/MIME');
|
||||||
const { arrayBufferToBlob, blobToArrayBuffer, dataURLToBlob } = require('blob-util');
|
const { arrayBufferToBlob, blobToArrayBuffer, dataURLToBlob } = require('blob-util');
|
||||||
const { autoOrientImage } = require('../auto_orient_image');
|
const { autoOrientImage } = require('../auto_orient_image');
|
||||||
|
@ -163,3 +164,5 @@ exports.deleteData = (deleteAttachmentData) => {
|
||||||
await deleteAttachmentData(attachment.path);
|
await deleteAttachmentData(attachment.path);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.save = AttachmentTS.save;
|
||||||
|
|
|
@ -177,7 +177,7 @@
|
||||||
return i18n('unnamedFile');
|
return i18n('unnamedFile');
|
||||||
},
|
},
|
||||||
saveFile() {
|
saveFile() {
|
||||||
Signal.Types.AttachmentTS.save({
|
Signal.Types.Attachment.save({
|
||||||
attachment: this.model,
|
attachment: this.model,
|
||||||
document,
|
document,
|
||||||
getAbsolutePath: Signal.Migrations.getAbsoluteAttachmentPath,
|
getAbsolutePath: Signal.Migrations.getAbsoluteAttachmentPath,
|
||||||
|
|
|
@ -606,7 +606,7 @@
|
||||||
const saveAttachment = async ({ message } = {}) => {
|
const saveAttachment = async ({ message } = {}) => {
|
||||||
const attachment = message.attachments[0];
|
const attachment = message.attachments[0];
|
||||||
const timestamp = message.received_at;
|
const timestamp = message.received_at;
|
||||||
Signal.Types.AttachmentTS.save({
|
Signal.Types.Attachment.save({
|
||||||
attachment,
|
attachment,
|
||||||
document,
|
document,
|
||||||
getAbsolutePath: Signal.Migrations.getAbsoluteAttachmentPath,
|
getAbsolutePath: Signal.Migrations.getAbsoluteAttachmentPath,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue