Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasFella committed Aug 3, 2023
1 parent f474829 commit 47684b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Quotient/e2ee/sssshandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ void SSSSHandler::unlockSSSSFromPassword(const QString& password)
}

auto job = m_connection->callApi<GetRoomKeysVersionJob>();
connect(job, &BaseJob::finished, this, [=](){
connect(job, &BaseJob::finished, this, [this, job, megolmDecryptionKey](){
auto keysJob = m_connection->callApi<GetRoomKeysJob>(job->jsonData()["version"_ls].toString());
connect(keysJob, &BaseJob::finished, this, [=](){
connect(keysJob, &BaseJob::finished, this, [this, keysJob, megolmDecryptionKey](){
const auto &rooms = keysJob->jsonData()["rooms"_ls].toObject();
for (const auto& roomId : rooms.keys()) {
if (!m_connection->room(roomId)) {
Expand Down
9 changes: 4 additions & 5 deletions Quotient/e2ee/sssshandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@
#include <QtCore/QObject>
#include <QtCore/QPointer>

#include "connection.h"
#include "../connection.h"

class SSSSHandler : public QObject
class QUOTIENT_API SSSSHandler : public QObject
{
Q_OBJECT
Q_PROPERTY(Quotient::Connection* connection READ connection WRITE setConnection NOTIFY connectionChanged)

public:

SSSSHandler(QObject* parent = nullptr);
explicit SSSSHandler(QObject* parent = nullptr);

//! \brief Unlock the secret backup from the given password
void unlockSSSSFromPassword(const QString& password);
Q_INVOKABLE void unlockSSSSFromPassword(const QString& password);

//! \brief Decrypt the key with this name from the account data
QByteArray decryptKey(const QString& name, const QByteArray& decryptionKey) const;
Expand Down

0 comments on commit 47684b3

Please sign in to comment.