support of the new managers in account code, new states, new lambdas, even launches now, even receives some bundles
This commit is contained in:
parent
db3bc358a7
commit
dfe72ca36c
12 changed files with 113 additions and 25 deletions
|
@ -31,7 +31,7 @@ Core::OmemoHandler::OmemoHandler(Account* account) :
|
|||
db.open();
|
||||
try {
|
||||
QVariant own = meta->getRecord("ownDevice");
|
||||
ownDevice.value() = own.value<OwnDevice>();
|
||||
ownDevice = own.value<OwnDevice>();
|
||||
qDebug() << "Successfully found own device omemo data for account" << acc->getName();
|
||||
} catch (const DataBase::NotFound& e) {
|
||||
qDebug() << "No device omemo data was found for account" << acc->getName();
|
||||
|
@ -42,6 +42,10 @@ Core::OmemoHandler::~OmemoHandler() {
|
|||
db.close();
|
||||
}
|
||||
|
||||
bool Core::OmemoHandler::hasOwnDevice() {
|
||||
return ownDevice.has_value();
|
||||
}
|
||||
|
||||
QFuture<void> Core::OmemoHandler::emptyVoidFuture() {
|
||||
QFutureInterface<QXmppOmemoStorage::OmemoData> result(QFutureInterfaceBase::Started);
|
||||
result.reportFinished();
|
||||
|
@ -101,7 +105,7 @@ QFuture<void> Core::OmemoHandler::addPreKeyPairs(const QHash<uint32_t, QByteArra
|
|||
}
|
||||
|
||||
QFuture<void> Core::OmemoHandler::addSignedPreKeyPair(uint32_t keyId, const QXmppOmemoStorage::SignedPreKeyPair& keyPair) {
|
||||
signedPreKeyPairs->addRecord(keyId, keyPair);
|
||||
signedPreKeyPairs->forceRecord(keyId, keyPair);
|
||||
return emptyVoidFuture();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue