aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r--lib/connection.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 66df1e43..ec1c13f5 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -2154,4 +2154,20 @@ void Connection::saveMegolmSession(Room* room, const QString& senderKey, QOlmInb
{
database()->saveMegolmSession(room->id(), senderKey, session->sessionId(), session->pickle(picklingMode()));
}
+
+QStringList Connection::devicesForUser(User* user) const
+{
+ return d->deviceKeys[user->id()].keys();
+}
+
+QString Connection::curveKeyForUserDevice(const QString& user, const QString& device) const
+{
+ return d->deviceKeys[user][device].keys[QStringLiteral("curve25519:") + device];
+}
+
+QString Connection::edKeyForUserDevice(const QString& user, const QString& device) const
+{
+ return d->deviceKeys[user][device].keys[QStringLiteral("ed25519:") + device];
+}
+
#endif