diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-01-21 13:21:34 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2021-01-21 13:21:34 +0100 |
commit | f31e2ffc7bcd860440838c5c343217907dbc000d (patch) | |
tree | 14d186e6655da3ca2068b59ea123c82800ac5890 | |
parent | Merge pull request #388 from LorenDB/fixBorkedDbus (diff) | |
download | nheko-f31e2ffc7bcd860440838c5c343217907dbc000d.tar.xz |
Handle devices without keys
-rw-r--r-- | src/Olm.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Olm.cpp b/src/Olm.cpp index fe789560..326e19ca 100644 --- a/src/Olm.cpp +++ b/src/Olm.cpp @@ -961,6 +961,12 @@ send_encrypted_to_device_messages(const std::map<std::string, std::vector<std::s auto d = deviceKeys->device_keys.at(device); + if (!d.keys.count("curve25519:" + device) || + !d.keys.count("ed25519:" + device)) { + nhlog::crypto()->warn("Skipping device {} since it has no keys!", + device); + } + auto session = cache::getLatestOlmSession(d.keys.at("curve25519:" + device)); if (!session || force_new_session) { |