diff --git a/src/neochatconnection.cpp b/src/neochatconnection.cpp index 1ae4e8432..0d5977c56 100644 --- a/src/neochatconnection.cpp +++ b/src/neochatconnection.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include @@ -482,23 +481,6 @@ QCoro::Task NeoChatConnection::setupPushNotifications(QString endpoint) #endif } -QString NeoChatConnection::deviceKey() const -{ - return edKeyForUserDevice(userId(), deviceId()); -} - -QString NeoChatConnection::encryptionKey() const -{ - auto query = database()->prepareQuery(u"SELECT curveKey FROM tracked_devices WHERE matrixId=:matrixId AND deviceid=:deviceId LIMIT 1;"_s); - query.bindValue(u":matrixId"_s, userId()); - query.bindValue(u":deviceId"_s, deviceId()); - database()->execute(query); - if (!query.next()) { - return {}; - } - return query.value(0).toString(); -} - bool NeoChatConnection::isOnline() const { return m_isOnline; diff --git a/src/neochatconnection.h b/src/neochatconnection.h index 519f77c7d..d3a652ac9 100644 --- a/src/neochatconnection.h +++ b/src/neochatconnection.h @@ -31,8 +31,6 @@ class NeoChatConnection : public Quotient::Connection * Set to an empty string to remove the label. */ Q_PROPERTY(QString label READ label WRITE setLabel NOTIFY labelChanged) - Q_PROPERTY(QString deviceKey READ deviceKey CONSTANT) - Q_PROPERTY(QString encryptionKey READ encryptionKey CONSTANT) /** * @brief The model with the account's 3PIDs. @@ -180,9 +178,6 @@ public: // the reference could be destroyed before the task is finished QCoro::Task setupPushNotifications(QString endpoint); - QString deviceKey() const; - QString encryptionKey() const; - bool isOnline() const; LinkPreviewer *previewerForLink(const QUrl &link);