diff --git a/src/Olm.cpp b/src/Olm.cpp
index ff4c883b..4a403cd0 100644
--- a/src/Olm.cpp
+++ b/src/Olm.cpp
@@ -882,13 +882,12 @@ handle_key_request_message(const mtx::events::DeviceEvent<mtx::events::msg::KeyR
}
}
- if (!verifiedDevice && !shouldSeeKeys &&
- !utils::respondsToKeyRequests(req.content.room_id)) {
+ if (!verifiedDevice && !shouldSeeKeys) {
nhlog::crypto()->debug("ignoring key request for room {}", req.content.room_id);
return;
}
- if (verifiedDevice || utils::respondsToKeyRequests(req.content.room_id)) {
+ if (verifiedDevice) {
// share the minimum index we have
minimumIndex = -1;
}
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 8d5ae4a9..eabf50d9 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -172,22 +172,6 @@ utils::scaleFactor()
return settings.value("settings/scale_factor", -1).toFloat();
}
-bool
-utils::respondsToKeyRequests(const std::string &roomId)
-{
- return respondsToKeyRequests(QString::fromStdString(roomId));
-}
-
-bool
-utils::respondsToKeyRequests(const QString &roomId)
-{
- if (roomId.isEmpty())
- return false;
-
- QSettings settings;
- return settings.value("rooms/respond_to_key_requests/" + roomId, false).toBool();
-}
-
void
utils::setKeyRequestsPreference(QString roomId, bool value)
{
diff --git a/src/Utils.h b/src/Utils.h
index 1d48e2c7..a50681ca 100644
--- a/src/Utils.h
+++ b/src/Utils.h
@@ -67,12 +67,6 @@ scaleFactor();
void
setScaleFactor(float factor);
-//! Whether or not we should respond to key requests for the given room.
-bool
-respondsToKeyRequests(const QString &roomId);
-bool
-respondsToKeyRequests(const std::string &roomId);
-
void
setKeyRequestsPreference(QString roomId, bool value);
diff --git a/src/ui/RoomSettings.cpp b/src/ui/RoomSettings.cpp
index f78ef09b..ae5fce0c 100644
--- a/src/ui/RoomSettings.cpp
+++ b/src/ui/RoomSettings.cpp
@@ -291,12 +291,6 @@ RoomSettings::accessJoinRules()
return accessRules_;
}
-bool
-RoomSettings::respondsToKeyRequests()
-{
- return usesEncryption_ && utils::respondsToKeyRequests(roomid_);
-}
-
void
RoomSettings::changeKeyRequestsPreference(bool isOn)
{
diff --git a/src/ui/RoomSettings.h b/src/ui/RoomSettings.h
index 367f3111..2a68a182 100644
--- a/src/ui/RoomSettings.h
+++ b/src/ui/RoomSettings.h
@@ -78,7 +78,6 @@ class RoomSettings : public QObject
Q_PROPERTY(bool canChangeJoinRules READ canChangeJoinRules CONSTANT)
Q_PROPERTY(bool canChangeNameAndTopic READ canChangeNameAndTopic CONSTANT)
Q_PROPERTY(bool isEncryptionEnabled READ isEncryptionEnabled NOTIFY encryptionChanged)
- Q_PROPERTY(bool respondsToKeyRequests READ respondsToKeyRequests NOTIFY keyRequestsChanged)
public:
RoomSettings(QString roomid, QObject *parent = nullptr);
@@ -91,7 +90,6 @@ public:
int memberCount() const;
int notifications();
int accessJoinRules();
- bool respondsToKeyRequests();
bool isLoading() const;
//! Whether the user has enough power level to send m.room.join_rules events.
bool canChangeJoinRules() const;
|