Provide needed function to migration process
And disable attachment cleanup for now
This commit is contained in:
parent
f926a08aa8
commit
52ee6abf52
2 changed files with 12 additions and 7 deletions
|
@ -1183,3 +1183,8 @@ textsecure.MessageReceiver = function MessageReceiverWrapper(
|
||||||
textsecure.MessageReceiver.prototype = {
|
textsecure.MessageReceiver.prototype = {
|
||||||
constructor: textsecure.MessageReceiver,
|
constructor: textsecure.MessageReceiver,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
textsecure.MessageReceiver.stringToArrayBuffer =
|
||||||
|
MessageReceiver.stringToArrayBuffer;
|
||||||
|
textsecure.MessageReceiver.arrayBufferToString =
|
||||||
|
MessageReceiver.arrayBufferToString;
|
||||||
|
|
14
main.js
14
main.js
|
@ -26,7 +26,7 @@ const packageJson = require('./package.json');
|
||||||
|
|
||||||
const sql = require('./app/sql');
|
const sql = require('./app/sql');
|
||||||
const sqlChannels = require('./app/sql_channel');
|
const sqlChannels = require('./app/sql_channel');
|
||||||
const attachments = require('./app/attachments');
|
// const attachments = require('./app/attachments');
|
||||||
const attachmentChannel = require('./app/attachment_channel');
|
const attachmentChannel = require('./app/attachment_channel');
|
||||||
const autoUpdate = require('./app/auto_update');
|
const autoUpdate = require('./app/auto_update');
|
||||||
const createTrayIcon = require('./app/tray_icon');
|
const createTrayIcon = require('./app/tray_icon');
|
||||||
|
@ -631,12 +631,12 @@ app.on('ready', async () => {
|
||||||
await sql.initialize({ configDir: userDataPath, key });
|
await sql.initialize({ configDir: userDataPath, key });
|
||||||
await sqlChannels.initialize({ userConfig });
|
await sqlChannels.initialize({ userConfig });
|
||||||
|
|
||||||
const allAttachments = await attachments.getAllAttachments(userDataPath);
|
// const allAttachments = await attachments.getAllAttachments(userDataPath);
|
||||||
const orphanedAttachments = await sql.removeKnownAttachments(allAttachments);
|
// const orphanedAttachments = await sql.removeKnownAttachments(allAttachments);
|
||||||
await attachments.deleteAll({
|
// await attachments.deleteAll({
|
||||||
userDataPath,
|
// userDataPath,
|
||||||
attachments: orphanedAttachments,
|
// attachments: orphanedAttachments,
|
||||||
});
|
// });
|
||||||
|
|
||||||
ready = true;
|
ready = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue