Support additional sticker states

Co-authored-by: scott@signal.org
Co-authored-by: ken@signal.org
This commit is contained in:
Ken Powers 2019-05-23 18:27:42 -07:00 committed by Scott Nonnenberg
parent 41880cfe66
commit be5d0837f8
35 changed files with 925 additions and 249 deletions

10
main.js
View file

@ -726,6 +726,14 @@ app.on('ready', async () => {
});
}
try {
await attachments.clearTempPath(userDataPath);
} catch (error) {
logger.error(
'main/ready: Error deleting temp dir:',
error && error.stack ? error.stack : error
);
}
await attachmentChannel.initialize({
configDir: userDataPath,
cleanupOrphanedAttachments,
@ -1034,7 +1042,7 @@ function handleSgnlLink(incomingUrl) {
if (command === 'addstickers' && mainWindow && mainWindow.webContents) {
const { pack_id: packId, pack_key: packKeyHex } = args;
const packKey = Buffer.from(packKeyHex, 'hex').toString('base64');
mainWindow.webContents.send('add-sticker-pack', { packId, packKey });
mainWindow.webContents.send('show-sticker-pack', { packId, packKey });
} else {
console.error('Unhandled sgnl link');
}