respect password type when adding account, preventing loading bad password

This commit is contained in:
shunf4 2021-10-06 22:55:23 +08:00
parent 8b3752ef47
commit d20fd84d39

View File

@ -118,8 +118,9 @@ void Core::Squawk::newAccountRequest(const QMap<QString, QVariant>& map)
QString server = map.value("server").toString();
QString password = map.value("password").toString();
QString resource = map.value("resource").toString();
int passwordType = map.value("passwordType").toInt();
addAccount(login, server, password, name, resource, Shared::AccountPassword::plain);
addAccount(login, server, password, name, resource, Shared::Global::fromInt<Shared::AccountPassword>(passwordType));
}
void Core::Squawk::addAccount(