aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTobias Fella <fella@posteo.de>2022-04-16 23:32:59 +0200
committerTobias Fella <fella@posteo.de>2022-04-16 23:32:59 +0200
commit3a81aea545ec014d597f3756c362913aad4421df (patch)
treeebecb575f8d6a65e1c7a8af09572725c587990a7 /lib
parentbcde0a74e82e7dbb9eed6b108ebbb63941da34ea (diff)
downloadlibquotient-3a81aea545ec014d597f3756c362913aad4421df.tar.gz
libquotient-3a81aea545ec014d597f3756c362913aad4421df.zip
Fixes
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)