aboutsummaryrefslogtreecommitdiff
path: root/src/account.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/account.cpp')
-rw-r--r--src/account.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/account.cpp b/src/account.cpp
index 54edf6e..297d2f4 100644
--- a/src/account.cpp
+++ b/src/account.cpp
@@ -18,10 +18,12 @@
olm::OneTimeKey const * olm::Account::lookup_key(
- std::uint32_t id
+ olm::Curve25519PublicKey const & public_key
) {
for (olm::OneTimeKey const & key : one_time_keys) {
- if (key.id == id) return &key;
+ if (0 == memcmp(key.key.public_key, public_key.public_key, 32)) {
+ return &key;
+ }
}
return 0;
}