Newer
Older
client = std::make_shared<Client>(server);
olm_client = make_shared<OlmClient>();
ifstream db("account.json");
string db_data((istreambuf_iterator<char>(db)), istreambuf_iterator<char>());
if (db_data.empty())
olm_client->create_new_account();
else
olm_client->load(json::parse(db_data).at("account").get<std::string>(),
STORAGE_KEY);
storage.load();
client->login(username, password, login_cb);
client->close();
console->info("exit");