This commit is contained in:
timoreo 2023-12-09 23:40:19 +01:00
parent aa512aa4af
commit a4f6c72e1d
Signed by: timoreo
GPG key ID: 121A72C3512BA288

View file

@ -1,24 +1,20 @@
#include <3ds.h>
#include <matrixclient.h>
#include <memorystore.h>
#include <olm/olm.h>
#include <olm/account.hh>
#include <cstring>
#include <filesystem>
#include <fstream>
#include <iostream>
#include <memorystore.h>
#include <olm/account.hh>
#define PREFIX_DIRECTORY "./matrix-storage"
#define TOKEN_FILENAME "token"
#define DEVICE_ID "XREVXEDLHU"
class Store : public Matrix::Store {
void setSyncToken(std::string token) override {
}
std::string getSyncToken() override {
return "";
}
void setSyncToken(std::string token) override {} //TODO store in file
std::string getSyncToken() override { return ""; }
void setFilterId(std::string filterId) override {}
std::string getFilterId() override { return ""; }
};
@ -45,7 +41,6 @@ void generate_otk(olm::Account& acc){
generate_otk(acc, otkcount);
}
void generate_device_key(olm::Account& acc) {
size_t len = acc.new_account_random_length();
std::unique_ptr<uint8_t[]> random = std::make_unique<uint8_t[]>(len);
@ -226,7 +221,6 @@ void load_account(Matrix::Client& client, olm::Account& acc){
}
}
int main() {
fsInit();
gfxInitDefault();
@ -289,8 +283,7 @@ int main() {
});
client.startSyncLoop();
}
wrong:
;
wrong:;
}
client.stopSyncLoop();
// DO NOT LOGOUT, KEEP ENCRYPTION KEYS