Skip to content
Snippets Groups Projects
crypto_bot.cpp 39.1 KiB
Newer Older
  • Learn to ignore specific revisions
  •         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();