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:
parent
45ac45c019
commit
94a6df47cc
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user