Commit cde65dd9 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

ringaccount: emit signal on password change

Change-Id: I8f2da0b549f9022563e0acb4878106b83aaae823
parent 19d290d5
......@@ -435,14 +435,14 @@ readArchive(const std::string& path, const std::string& pwd)
data = loadFile(path);
} catch (const std::exception& e) {
JAMI_ERR("Error loading archive: %s", e.what());
throw;
throw e;
}
// Decrypt
try {
data = archiver::decompress(dht::crypto::aesDecrypt(data, pwd));
} catch (const std::exception& e) {
JAMI_ERR("Error decrypting archive: %s", e.what());
throw;
throw e;
}
}
return data;
......
......@@ -1002,6 +1002,8 @@ RingAccount::changeArchivePassword(const std::string& password_old, const std::s
JAMI_ERR("[Account %s] Can't change archive password: %s", getAccountID().c_str(), ex.what());
return false;
}
if (password_old != password_new)
emitSignal<DRing::ConfigurationSignal::AccountDetailsChanged>(getAccountID(), getAccountDetails());
return true;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment