aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/connection.cpp4
-rw-r--r--lib/room.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 28377dd9..42a5f5fc 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -241,7 +241,7 @@ public:
auto s = std::move(session);
olmSessions[senderKey].erase(olmSessions[senderKey].begin() + i);
olmSessions[senderKey].insert(olmSessions[senderKey].begin(), std::move(s));
- return { std::get<QString>(result), session->sessionId() };
+ return { std::get<QString>(result), olmSessions[senderKey][0]->sessionId() };
} else {
qCDebug(E2EE) << "Failed to decrypt prekey message";
return {};
@@ -287,7 +287,7 @@ public:
auto s = std::move(session);
olmSessions[senderKey].erase(olmSessions[senderKey].begin() + i);
olmSessions[senderKey].insert(olmSessions[senderKey].begin(), std::move(s));
- return { std::get<QString>(result), session->sessionId() };
+ return { std::get<QString>(result), olmSessions[senderKey][0]->sessionId() };
}
}
qCWarning(E2EE) << "Failed to decrypt message";
diff --git a/lib/room.cpp b/lib/room.cpp
index 61f57245..a423e04f 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -444,7 +444,7 @@ public:
qCWarning(E2EE) << "Failed to load key for new megolm session";
return;
}
- addInboundGroupSession(q->connection()->olmAccount()->identityKeys().curve25519, currentOutboundMegolmSession->sessionId(), std::get<QByteArray>(sessionKey), QString(connection->olmAccount()->identityKeys().ed25519));
+ addInboundGroupSession(currentOutboundMegolmSession->sessionId(), std::get<QByteArray>(sessionKey), q->localUser()->id(), "SELF"_ls);
}
std::unique_ptr<EncryptedEvent> payloadForUserDevice(User* user, const QString& device, const QByteArray& sessionId, const QByteArray& sessionKey)