This commit is contained in:
Tobias Fella
2024-05-26 14:43:41 +02:00
parent 1235e46575
commit 27f4dfbf8e
9 changed files with 180 additions and 0 deletions

View File

@@ -17,6 +17,7 @@
#include <Quotient/connection.h>
#include <Quotient/jobs/basejob.h>
#include <Quotient/keyimport.h>
#include <Quotient/quotient_common.h>
#include <qt6keychain/keychain.h>
@@ -500,4 +501,15 @@ LinkPreviewer *NeoChatConnection::previewerForLink(const QUrl &link)
return previewer;
}
void NeoChatConnection::exportMegolmSessions(const QString &passphrase, const QString &path)
{
KeyImport keyImport;
auto result = keyImport.exportKeys(passphrase, this);
if (!result.has_value()) {
qWarning() << "error TODO";
return;
}
Controller::instance().saveFileContent(path, result.value());
}
#include "moc_neochatconnection.cpp"