1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Update avatar encryption when changing password

This commit is contained in:
tux3 2015-12-05 22:35:16 +01:00
parent 45ac45c019
commit 94a6df47cc
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -519,6 +519,7 @@ void Profile::restartCore()
void Profile::setPassword(QString newPassword) void Profile::setPassword(QString newPassword)
{ {
QList<HistoryKeeper::HistMessage> oldMessages = HistoryKeeper::exportMessagesDeleteFile(); QList<HistoryKeeper::HistMessage> oldMessages = HistoryKeeper::exportMessagesDeleteFile();
QByteArray avatar = loadAvatarData(core->getSelfId().publicKey);
password = newPassword; password = newPassword;
passkey = *core->createPasskey(password); passkey = *core->createPasskey(password);
@ -526,4 +527,5 @@ void Profile::setPassword(QString newPassword)
HistoryKeeper::getInstance()->importMessages(oldMessages); HistoryKeeper::getInstance()->importMessages(oldMessages);
Nexus::getDesktopGUI()->reloadHistory(); Nexus::getDesktopGUI()->reloadHistory();
saveAvatar(avatar, core->getSelfId().publicKey);
} }