Passwords can now be reset

This commit is contained in:
Soumya Himanish Mohapatra 2018-01-14 20:19:10 +05:30
parent f3d77fdcf2
commit fdcc31f049
6 changed files with 116 additions and 15 deletions

View file

@ -173,9 +173,9 @@ export default function(state, emitter) {
}
});
emitter.on('password', async ({ password, file }) => {
emitter.on('password', async ({ existingPassword, password, file }) => {
try {
await FileSender.setPassword(password, file);
await FileSender.setPassword(existingPassword, password, file);
metrics.addedPassword({ size: file.size });
file.password = password;
state.storage.writeFiles();