Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
Update avatar encryption when changing password
Browse files Browse the repository at this point in the history
  • Loading branch information
tux3 committed Dec 5, 2015
1 parent 45ac45c commit 94a6df4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/persistence/profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,13 @@ void Profile::restartCore()
void Profile::setPassword(QString newPassword)
{
QList<HistoryKeeper::HistMessage> oldMessages = HistoryKeeper::exportMessagesDeleteFile();
QByteArray avatar = loadAvatarData(core->getSelfId().publicKey);

password = newPassword;
passkey = *core->createPasskey(password);
saveToxSave();

HistoryKeeper::getInstance()->importMessages(oldMessages);
Nexus::getDesktopGUI()->reloadHistory();
saveAvatar(avatar, core->getSelfId().publicKey);
}

0 comments on commit 94a6df4

Please sign in to comment.