1 files changed, 6 insertions, 0 deletions
diff --git a/src/Olm.cpp b/src/Olm.cpp
index 963bea41..f65430f1 100644
--- a/src/Olm.cpp
+++ b/src/Olm.cpp
@@ -3,6 +3,7 @@
#include "Cache.h"
#include "Logging.h"
#include "MatrixClient.h"
+#include "Utils.h"
using namespace mtx::crypto;
@@ -377,6 +378,11 @@ handle_key_request_message(const mtx::events::msg::KeyRequest &req)
return;
}
+ if (!utils::respondsToKeyRequests(req.room_id)) {
+ nhlog::crypto()->info("ignoring all key requests for room {}", req.room_id);
+ return;
+ }
+
//
// Prepare the m.room_key event.
//
|