[network/ruqola] src: Remove otr support (it was removed from RC from some version and it

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 8f0f0db59a9ad71a81fe84573c634e90b6e56b9a by Laurent Montel.
Committed on 06/08/2026 at 20:35.
Pushed by mlaurent into branch 'master'.

Remove otr support (it was removed from RC from some version and it

never fixes in ruqola)

M  +0    -6    src/core/CMakeLists.txt
M  +0    -3    src/core/autotests/CMakeLists.txt
D  +0    -24   src/core/autotests/otrmanagertest.cpp
D  +0    -19   src/core/autotests/otrmanagertest.h
D  +0    -22   src/core/autotests/otrnotificationjobtest.cpp
D  +0    -19   src/core/autotests/otrnotificationjobtest.h
D  +0    -60   src/core/autotests/otrtest.cpp
D  +0    -21   src/core/autotests/otrtest.h
M  +0    -20   src/core/ddpapi/ddpclient.cpp
M  +0    -4    src/core/ddpapi/ddpclient.h
D  +0    -119  src/core/otr/otr.cpp
D  +0    -62   src/core/otr/otr.h
D  +0    -66   src/core/otr/otrmanager.cpp
D  +0    -30   src/core/otr/otrmanager.h
D  +0    -137  src/core/otr/otrnotificationjob.cpp
D  +0    -40   src/core/otr/otrnotificationjob.h
M  +0    -23   src/core/rocketchataccount.cpp
M  +0    -6    src/core/rocketchataccount.h
M  +0    -11   src/core/rocketchatbackend.cpp
M  +0    -8    src/core/ruqolaserverconfig.cpp
M  +0    -2    src/core/ruqolaserverconfig.h
M  +0    -3    src/widgets/CMakeLists.txt
M  +0    -7    src/widgets/administratorsettingsdialog/autotests/encryptionsettingswidgettest.cpp
M  +1    -9    src/widgets/administratorsettingsdialog/encryption/encryptionsettingswidget.cpp
M  +0    -1    src/widgets/administratorsettingsdialog/encryption/encryptionsettingswidget.h
D  +0    -29   src/widgets/otr/autotests/CMakeLists.txt
D  +0    -36   src/widgets/otr/autotests/otrwidgettest.cpp
D  +0    -18   src/widgets/otr/autotests/otrwidgettest.h
D  +0    -35   src/widgets/otr/otrwidget.cpp
D  +0    -22   src/widgets/otr/otrwidget.h
M  +0    -11   src/widgets/room/channelactionpopupmenu.cpp
M  +0    -1    src/widgets/room/channelactionpopupmenu.h
M  +3    -4    src/widgets/room/roomheaderwidget.h
M  +0    -25   src/widgets/room/roomwidget.cpp
M  +0    -5    src/widgets/room/roomwidget.h

https://invent.kde.org/network/ruqola/-/commit/8f0f0db59a9ad71a81fe84573c634e90b6e56b9a

diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 27417d07f0..0ea619d23d 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -349,12 +349,6 @@ target_sources(
         servererrorinfohistorymanager.h
         oauth/oauthinfo.cpp
         oauth/oauthinfo.h
-        otr/otr.cpp
-        otr/otr.h
-        otr/otrmanager.cpp
-        otr/otrmanager.h
-        otr/otrnotificationjob.cpp
-        otr/otrnotificationjob.h
         ownuser/ownuser.cpp
         ownuser/ownuser.h
         ownuser/ownuserpreferences.cpp
diff --git a/src/core/autotests/CMakeLists.txt b/src/core/autotests/CMakeLists.txt
index 3a1e2a4587..ecd707c8ca 100644
--- a/src/core/autotests/CMakeLists.txt
+++ b/src/core/autotests/CMakeLists.txt
@@ -94,8 +94,6 @@ if(NOT TARGET KF6::TextEmoticonsWidgets)
     add_ruqola_test(customemojitest.cpp)
 endif()
 add_ruqola_test(emojimanagertest.cpp)
-add_ruqola_test(otrtest.cpp)
-add_ruqola_test(otrmanagertest.cpp)
 add_ruqola_test(rocketchataccounttest.cpp)
 add_ruqola_test(usersmodeltest.cpp)
 add_ruqola_test(usersforroommodeltest.cpp)
@@ -178,7 +176,6 @@ add_ruqola_test(roleinfotest.cpp)
 add_ruqola_test(customsoundinfotest.cpp)
 add_ruqola_test(permissionstest.cpp)
 add_ruqola_test(rolesmodeltest.cpp)
-add_ruqola_test(otrnotificationjobtest.cpp)
 add_ruqola_test(customsoundsmanagertest.cpp)
 add_ruqola_test(rolesmanagertest.cpp)
 add_ruqola_test(awaymanagertest.cpp)
diff --git a/src/core/autotests/otrmanagertest.cpp b/src/core/autotests/otrmanagertest.cpp
deleted file mode 100644
index c7e0ee9965..0000000000
--- a/src/core/autotests/otrmanagertest.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2018-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#include "otrmanagertest.h"
-#include "otr/otrmanager.h"
-#include <QTest>
-
-QTEST_GUILESS_MAIN(OtrManagerTest)
-
-OtrManagerTest::OtrManagerTest(QObject *parent)
-    : QObject(parent)
-{
-}
-
-void OtrManagerTest::shouldHaveDefaultValues()
-{
-    OtrManager w(nullptr);
-    // TODO
-}
-
-#include "moc_otrmanagertest.cpp"
diff --git a/src/core/autotests/otrmanagertest.h b/src/core/autotests/otrmanagertest.h
deleted file mode 100644
index 1890bec912..0000000000
--- a/src/core/autotests/otrmanagertest.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2018-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#pragma once
-
-#include <QObject>
-
-class OtrManagerTest : public QObject
-{
-    Q_OBJECT
-public:
-    explicit OtrManagerTest(QObject *parent = nullptr);
-    ~OtrManagerTest() override = default;
-private Q_SLOTS:
-    void shouldHaveDefaultValues();
-};
diff --git a/src/core/autotests/otrnotificationjobtest.cpp b/src/core/autotests/otrnotificationjobtest.cpp
deleted file mode 100644
index 11b78a48fc..0000000000
--- a/src/core/autotests/otrnotificationjobtest.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2021-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#include "otrnotificationjobtest.h"
-#include "otr/otrnotificationjob.h"
-#include <QTest>
-QTEST_GUILESS_MAIN(OtrNotificationJobTest)
-OtrNotificationJobTest::OtrNotificationJobTest(QObject *parent)
-    : QObject{parent}
-{
-}
-
-void OtrNotificationJobTest::shouldHaveDefaultValues()
-{
-    OtrNotificationJob job;
-    QVERIFY(!job.canStart());
-}
-
-#include "moc_otrnotificationjobtest.cpp"
diff --git a/src/core/autotests/otrnotificationjobtest.h b/src/core/autotests/otrnotificationjobtest.h
deleted file mode 100644
index 070202d965..0000000000
--- a/src/core/autotests/otrnotificationjobtest.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2021-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#pragma once
-
-#include <QObject>
-
-class OtrNotificationJobTest : public QObject
-{
-    Q_OBJECT
-public:
-    explicit OtrNotificationJobTest(QObject *parent = nullptr);
-    ~OtrNotificationJobTest() override = default;
-private Q_SLOTS:
-    void shouldHaveDefaultValues();
-};
diff --git a/src/core/autotests/otrtest.cpp b/src/core/autotests/otrtest.cpp
deleted file mode 100644
index d17d9c3c9f..0000000000
--- a/src/core/autotests/otrtest.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2018-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#include "otrtest.h"
-#include "otr/otr.h"
-#include "ruqola_autotest_helper.h"
-#include <QJsonArray>
-#include <QJsonDocument>
-#include <QJsonObject>
-#include <QTest>
-
-using namespace Qt::Literals::StringLiterals;
-QTEST_GUILESS_MAIN(OtrTest)
-
-OtrTest::OtrTest(QObject *parent)
-    : QObject(parent)
-{
-}
-
-void OtrTest::shouldHaveDefaultValue()
-{
-    Otr t;
-    QVERIFY(t.roomId().isEmpty());
-    QVERIFY(t.userId().isEmpty());
-    QCOMPARE(t.type(), Otr::OtrType::Unknown);
-    QVERIFY(!t.isValid());
-}
-
-void OtrTest::shouldParseOtr_data()
-{
-    QTest::addColumn<QString>("fileName");
-    QTest::addColumn<Otr::OtrType>("otrtype");
-    QTest::newRow("otrend") << u"otrend"_s << Otr::OtrType::End;
-    QTest::newRow("otrbegin") << u"otrbegin"_s << Otr::OtrType::Handshake;
-}
-
-void OtrTest::shouldParseOtr()
-{
-    QFETCH(QString, fileName);
-    QFETCH(Otr::OtrType, otrtype);
-    const QString originalJsonFile = QLatin1StringView(RUQOLA_DATA_DIR) + "/json/"_L1 + fileName + ".json"_L1;
-    QFile f(originalJsonFile);
-    QVERIFY(f.open(QIODevice::ReadOnly));
-    const QByteArray content = f.readAll();
-    f.close();
-    const QJsonDocument doc = QJsonDocument::fromJson(content);
-    const QJsonObject fields = doc.object().value("fields"_L1).toObject();
-    const QJsonArray contents = fields.value("args"_L1).toArray();
-
-    Otr otr;
-    otr.parseOtr(contents);
-    QVERIFY(otr.isValid());
-    QCOMPARE(otr.type(), otrtype);
-    // TODO
-}
-
-#include "moc_otrtest.cpp"
diff --git a/src/core/autotests/otrtest.h b/src/core/autotests/otrtest.h
deleted file mode 100644
index 9f026534f0..0000000000
--- a/src/core/autotests/otrtest.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2018-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#pragma once
-
-#include <QObject>
-
-class OtrTest : public QObject
-{
-    Q_OBJECT
-public:
-    explicit OtrTest(QObject *parent = nullptr);
-    ~OtrTest() override = default;
-private Q_SLOTS:
-    void shouldHaveDefaultValue();
-    void shouldParseOtr_data();
-    void shouldParseOtr();
-};
diff --git a/src/core/ddpapi/ddpclient.cpp b/src/core/ddpapi/ddpclient.cpp
index 787ae14523..fff1d4c6d5 100644
--- a/src/core/ddpapi/ddpclient.cpp
+++ b/src/core/ddpapi/ddpclient.cpp
@@ -211,19 +211,6 @@ quint64 DDPClient::uploadCustomSound(const QByteArray &sound)
     return method(result, DDPClient::MethodRequestedType::UpdateCustomSound, DDPClient::MessageType::Persistent);
 }
 
-quint64 DDPClient::streamNotifyUserOtrEnd(const QString &roomId, const QString &userId)
-{
-    const RocketChatMessage::RocketChatMessageResult result = mRocketChatMessage->streamNotifyUserOtrEnd(roomId, userId, mUid);
-    // qDebug() << " result " << result;
-    return method(result, DDPClient::MethodRequestedType::OtrEnd, DDPClient::MessageType::Persistent);
-}
-
-quint64 DDPClient::streamNotifyUserOtrHandshake(const QString &userFrom, const QString &userTo, const QString &publicKey)
-{
-    const RocketChatMessage::RocketChatMessageResult result = mRocketChatMessage->streamNotifyUserOtrHandshake(userFrom, userTo, publicKey, mUid);
-    return method(result, DDPClient::MethodRequestedType::OtrEnd, DDPClient::MessageType::Persistent);
-}
-
 quint64 DDPClient::enable2fa()
 {
     const RocketChatMessage::RocketChatMessageResult result = mRocketChatMessage->enable2fa(mUid);
@@ -248,13 +235,6 @@ quint64 DDPClient::validateTempToken2fa(const QString &code)
     return method(result, DDPClient::MethodRequestedType::ValidateTempToken2fa, DDPClient::MessageType::Persistent);
 }
 
-quint64 DDPClient::streamNotifyUserOtrAcknowledge(const QByteArray &roomId, const QByteArray &userId, const QString &publicKey)
-{
-    const RocketChatMessage::RocketChatMessageResult result = mRocketChatMessage->streamNotifyUserOtrAcknowledge(roomId, userId, publicKey, mUid);
-    // qDebug() << "streamNotifyUserOtrAcknowledge result " << result;
-    return method(result, DDPClient::MethodRequestedType::OtrEnd, DDPClient::MessageType::Persistent);
-}
-
 quint64 DDPClient::blockUser(const QString &rid, const QString &userId)
 {
     const RocketChatMessage::RocketChatMessageResult result = mRocketChatMessage->blockUser(rid, userId, mUid);
diff --git a/src/core/ddpapi/ddpclient.h b/src/core/ddpapi/ddpclient.h
index d6bee152a7..6ec409f072 100644
--- a/src/core/ddpapi/ddpclient.h
+++ b/src/core/ddpapi/ddpclient.h
@@ -53,7 +53,6 @@ public:
         CreateJitsiConfCall,
         InputUserChannelAutocompleteThread,
         InputUserChannelAutocomplete,
-        OtrEnd,
         AdminStatus,
         VideoConferenceCall,
         VideoConferenceRejected,
@@ -171,9 +170,6 @@ public:
     quint64 inputUserAutocomplete(const QByteArray &roomId, const QString &pattern, const QString &exceptions, bool threadDialog);
     quint64 unBlockUser(const QString &rid, const QString &userId);
     quint64 blockUser(const QString &rid, const QString &userId);
-    quint64 streamNotifyUserOtrEnd(const QString &roomId, const QString &userId);
-    quint64 streamNotifyUserOtrHandshake(const QString &userFrom, const QString &userTo, const QString &publicKey);
-    quint64 streamNotifyUserOtrAcknowledge(const QByteArray &roomId, const QByteArray &userId, const QString &publicKey);
     quint64 uploadCustomSound(const QByteArray &sound);
     void unsubscribe(quint64 registerId);
     quint64 enable2fa();
diff --git a/src/core/otr/otr.cpp b/src/core/otr/otr.cpp
deleted file mode 100644
index 4392261b4d..0000000000
--- a/src/core/otr/otr.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2018-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#include "otr.h"
-
-#include "ruqola_debug.h"
-#include <QJsonArray>
-#include <QJsonObject>
-
-using namespace Qt::Literals::StringLiterals;
-
-Otr::Otr() = default;
-
-Otr::~Otr() = default;
-
-void Otr::extractRoomUser(const QJsonObject &obj)
-{
-    mRoomId = obj.value("roomId"_L1).toString().toLatin1();
-    mUserId = obj.value("userId"_L1).toString().toLatin1();
-}
-
-void Otr::parseOtr(const QJsonArray &contents)
-{
-    // QJsonArray(["handshake",{"publicKey":"{\"crv\":\"P-256\",\"ext\":true,\"key_ops\":[],\"kty\":\"EC\",\"x\":\"R9TKy7SvVpbJurHngvOICZ5oBHvLt_P19RiBX7-ChBs\",\"y\":\"Ama4y0Sk5DWFRAImF8_4u--qKknOa44EP5hr0VXuEvM\"}","roomId":"4faACeGzSvG7xMcTyYbwG4T2uB3wZSZSKB","userId":"YbwG4T2uB3wZSZSKB"}])
-    qCDebug(RUQOLA_LOG) << " contents " << contents;
-    const QString type = contents.at(0).toString();
-    if (type == "end"_L1) {
-        const QJsonObject obj = contents.at(1).toObject();
-        extractRoomUser(obj);
-        qCDebug(RUQOLA_LOG) << " END" << obj << " roomId " << mRoomId << " userId " << mUserId;
-        mType = Otr::OtrType::End;
-    } else if (type == "handshake"_L1) {
-        // qDebug() << " HANDSHAKE" << contents.at(1).toObject();
-        const QJsonObject obj = contents.at(1).toObject();
-        extractRoomUser(obj);
-        const QString publicKey = obj.value("publicKey"_L1).toString();
-        qCDebug(RUQOLA_LOG) << " HANDSHAKE" << obj << " roomId " << mRoomId << " userId " << mUserId << " publicKey " << publicKey;
-        mType = Otr::OtrType::Handshake;
-        parseCryptoSettings(publicKey);
-    } else if (type == "deny"_L1) {
-        qCDebug(RUQOLA_LOG) << " Deny " << contents;
-        const QJsonObject obj = contents.at(1).toObject();
-        extractRoomUser(obj);
-        mType = Otr::OtrType::Deny;
-    } else if (type == "acknowledge"_L1) {
-        qCDebug(RUQOLA_LOG) << " acknowledge " << contents;
-        const QJsonObject obj = contents.at(1).toObject();
-        extractRoomUser(obj);
-        const QString publicKey = obj.value("publicKey"_L1).toString();
-        parseCryptoSettings(publicKey);
-        mType = Otr::OtrType::AcknowLedge;
-    } else {
-        qCDebug(RUQOLA_LOG) << " unknown" << type;
-    }
-}
-
-void Otr::parseCryptoSettings(const QString &publicKey)
-{
-    qDebug() << " parseCryptoSettings " << publicKey;
-    mCrypto.mCrypt = publicKey;
-
-    // TODO parse it.
-}
-
-CryptoSettings Otr::crypto() const
-{
-    return mCrypto;
-}
-
-Otr::OtrType Otr::type() const
-{
-    return mType;
-}
-
-QByteArray Otr::roomId() const
-{
-    return mRoomId;
-}
-
-QByteArray Otr::userId() const
-{
-    return mUserId;
-}
-
-bool Otr::isValid() const
-{
-    return mType != Otr::OtrType::Unknown;
-}
-
-QDebug operator<<(QDebug d, const Otr &t)
-{
-    d.space() << "isValid:" << t.isValid();
-    d.space() << "type :" << t.type();
-    d.space() << "userId:" << t.userId();
-    d.space() << "roomId:" << t.roomId();
-    d.space() << "crypto settings" << t.crypto();
-    return d;
-}
-
-QDebug operator<<(QDebug d, const CryptoSettings &t)
-{
-    d.space() << "mCrypt:" << t.mCrypt;
-    return d;
-}
-
-bool Otr::operator==(const Otr &other) const
-{
-    return roomId() == other.roomId() && userId() == other.userId() && type() == other.type() && crypto() == other.crypto();
-}
-
-bool CryptoSettings::operator==(const CryptoSettings &other) const
-{
-    return mCrypt == other.mCrypt;
-}
-
-#include "moc_otr.cpp"
diff --git a/src/core/otr/otr.h b/src/core/otr/otr.h
deleted file mode 100644
index d5da9fe0bf..0000000000
--- a/src/core/otr/otr.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2018-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#pragma once
-
-#include "libruqolacore_export.h"
-#include <QByteArray>
-#include <QMetaType>
-#include <QString>
-class QJsonArray;
-class QJsonObject;
-struct CryptoSettings {
-    QString mCrypt;
-    [[nodiscard]] bool operator==(const CryptoSettings &other) const;
-};
-
-class LIBRUQOLACORE_EXPORT Otr
-{
-    Q_GADGET
-public:
-    Otr();
-    ~Otr();
-
-    enum class OtrType : uint8_t {
-        Unknown = 0,
-        End,
-        Handshake,
-        Deny,
-        AcknowLedge,
-    };
-    Q_ENUM(OtrType)
-
-    void parseOtr(const QJsonArray &contents);
-
-    [[nodiscard]] OtrType type() const;
-
-    [[nodiscard]] QByteArray roomId() const;
-
-    [[nodiscard]] QByteArray userId() const;
-
-    [[nodiscard]] bool isValid() const;
-
-    [[nodiscard]] CryptoSettings crypto() const;
-
-    [[nodiscard]] bool operator==(const Otr &other) const;
-
-private:
-    LIBRUQOLACORE_NO_EXPORT void parseCryptoSettings(const QString &publicKey);
-    LIBRUQOLACORE_NO_EXPORT void extractRoomUser(const QJsonObject &obj);
-    // TODO add crypto support
-    QByteArray mRoomId;
-    QByteArray mUserId;
-    OtrType mType = OtrType::Unknown;
-    CryptoSettings mCrypto;
-};
-Q_DECLARE_TYPEINFO(Otr, Q_RELOCATABLE_TYPE);
-class QDebug;
-LIBRUQOLACORE_EXPORT QDebug operator<<(QDebug d, const Otr &t);
-LIBRUQOLACORE_EXPORT QDebug operator<<(QDebug d, const CryptoSettings &t);
diff --git a/src/core/otr/otrmanager.cpp b/src/core/otr/otrmanager.cpp
deleted file mode 100644
index 5687956861..0000000000
--- a/src/core/otr/otrmanager.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2018-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#include "otrmanager.h"
-#include "ddpapi/ddpclient.h"
-#include "otrnotificationjob.h"
-#include "rocketchataccount.h"
-#include "ruqola_debug.h"
-#include <KLocalizedString>
-#include <QJsonArray>
-
-OtrManager::OtrManager(RocketChatAccount *account, QObject *parent)
-    : QObject(parent)
-    , mRocketChatAccount(account)
-{
-}
-
-OtrManager::~OtrManager() = default;
-
-void OtrManager::slotActivateNotificationAction()
-{
-}
-
-void OtrManager::parseOtr(const QJsonArray &contents)
-{
-    Otr t;
-    t.parseOtr(contents);
-    auto job = new OtrNotificationJob(this);
-    connect(job, &OtrNotificationJob::acceptOtr, this, &OtrManager::slotAcceptOtr);
-    connect(job, &OtrNotificationJob::rejectOtr, this, &OtrManager::slotRejectOtr);
-    connect(job, &OtrNotificationJob::acknowLedgeOtr, this, &OtrManager::slotAcknowLedgeOtr);
-    connect(job, &OtrNotificationJob::endOtr, this, &OtrManager::slotEndOtr);
-
-    job->setRocketChatAccount(mRocketChatAccount);
-    job->setOtr(t);
-    job->start();
-}
-
-void OtrManager::slotAcceptOtr(const Otr &t)
-{
-    // We need to answer with own userId
-    mRocketChatAccount->ddp()->streamNotifyUserOtrAcknowledge(t.roomId(), mRocketChatAccount->userId(), t.crypto().mCrypt);
-}
-
-void OtrManager::slotRejectOtr(const Otr &t)
-{
-    // TODO add reject method.
-    qCDebug(RUQOLA_LOG) << " Otr rejected!" << t;
-}
-
-void OtrManager::slotAcknowLedgeOtr(const Otr &t)
-{
-    // TODO add slotAcknowLedgeOtr method.
-    mOtrList.append(t);
-    qCDebug(RUQOLA_LOG) << "AcknowLedge Otr!" << t;
-}
-
-void OtrManager::slotEndOtr(const Otr &t)
-{
-    mOtrList.removeAll(t);
-}
-
-#include "moc_otrmanager.cpp"
diff --git a/src/core/otr/otrmanager.h b/src/core/otr/otrmanager.h
deleted file mode 100644
index 567ce12b62..0000000000
--- a/src/core/otr/otrmanager.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2018-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#pragma once
-
-#include "libruqolacore_export.h"
-#include "otr.h"
-#include <QObject>
-class QJsonArray;
-class RocketChatAccount;
-class LIBRUQOLACORE_EXPORT OtrManager : public QObject
-{
-    Q_OBJECT
-public:
-    explicit OtrManager(RocketChatAccount *account, QObject *parent = nullptr);
-    ~OtrManager() override;
-    void parseOtr(const QJsonArray &contents);
-
-private:
-    LIBRUQOLACORE_NO_EXPORT void slotAcceptOtr(const Otr &t);
-    LIBRUQOLACORE_NO_EXPORT void slotRejectOtr(const Otr &t);
-    LIBRUQOLACORE_NO_EXPORT void slotAcknowLedgeOtr(const Otr &t);
-    LIBRUQOLACORE_NO_EXPORT void slotEndOtr(const Otr &t);
-    LIBRUQOLACORE_NO_EXPORT void slotActivateNotificationAction();
-    QList<Otr> mOtrList;
-    RocketChatAccount *const mRocketChatAccount;
-};
diff --git a/src/core/otr/otrnotificationjob.cpp b/src/core/otr/otrnotificationjob.cpp
deleted file mode 100644
index 255ec5226c..0000000000
--- a/src/core/otr/otrnotificationjob.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2021-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#include "otrnotificationjob.h"
-using namespace Qt::Literals::StringLiterals;
-
-#include "rocketchataccount.h"
-#include "ruqola_debug.h"
-
-#include <KLocalizedString>
-#include <KNotification>
-
-OtrNotificationJob::OtrNotificationJob(QObject *parent)
-    : QObject{parent}
-{
-}
-
-OtrNotificationJob::~OtrNotificationJob() = default;
-
-void OtrNotificationJob::setRocketChatAccount(RocketChatAccount *account)
-{
-    mRocketChatAccount = account;
-}
-
-bool OtrNotificationJob::canStart() const
-{
-    return mOtr.isValid();
-}
-
-void OtrNotificationJob::start()
-{
-    if (!canStart()) {
-        qCWarning(RUQOLA_LOG) << "Impossible to start OtrNotificationJob";
-        deleteLater();
-        return;
-    }
-    switch (mOtr.type()) {
-    case Otr::OtrType::Unknown:
-        qCWarning(RUQOLA_LOG) << "It's a bug we can't have otrtype == Unknown";
-        deleteLater();
-        break;
-    case Otr::OtrType::End: {
-        auto notification = new KNotification(u"Otr-end"_s, KNotification::CloseOnTimeout);
-        notification->setTitle(i18n("OTR"));
-        notification->setIconName(u"network-connect"_s);
-        notification->setText(generateText());
-        notification->sendEvent();
-        Q_EMIT endOtr(mOtr);
-        deleteLater();
-        break;
-    }
-    case Otr::OtrType::Handshake: {
-        auto notification = new KNotification(u"Otr-handshake"_s, KNotification::CloseOnTimeout);
-        notification->setTitle(i18n("OTR"));
-        notification->setIconName(u"network-connect"_s);
-        notification->setText(generateText());
-
-        auto rejectAction = notification->addAction(i18n("Reject"));
-        connect(rejectAction, &KNotificationAction::activated, this, &OtrNotificationJob::slotRejectOtr);
-
-        auto okAction = notification->addAction(i18n("Ok"));
-        connect(okAction, &KNotificationAction::activated, this, &OtrNotificationJob::slotAcceptOtr);
-        connect(notification, &KNotification::closed, this, &OtrNotificationJob::deleteLater);
-        notification->sendEvent();
-        break;
-    }
-    case Otr::OtrType::Deny: {
-        auto notification = new KNotification(u"Otr-deny"_s, KNotification::CloseOnTimeout);
-        notification->setTitle(i18n("OTR"));
-        notification->setIconName(u"network-connect"_s);
-        notification->setText(generateText());
-        notification->sendEvent();
-        deleteLater();
-        break;
-    }
-    case Otr::OtrType::AcknowLedge:
-        Q_EMIT acknowLedgeOtr(mOtr);
-        deleteLater();
-        break;
-    }
-}
-
-QString OtrNotificationJob::generateText()
-{
-    QString str;
-    // TODO search real name.
-    // const QByteArray userId = mOtr.userId();
-
-    switch (mOtr.type()) {
-    case Otr::OtrType::Unknown:
-        break;
-    case Otr::OtrType::End: {
-        str = mRocketChatAccount->accountName() + u'\n' + i18n("%1 ended the OTR session.", u"test"_s); // FIXME use correct name
-        break;
-    }
-    case Otr::OtrType::Handshake: {
-        str = mRocketChatAccount->accountName() + u'\n' + i18n("%1 wants to start OTR. Do you want to accept?", u"test"_s); // FIXME use correct name
-        break;
-    }
-    case Otr::OtrType::Deny: {
-        str = mRocketChatAccount->accountName() + u'\n' + i18n("%1 denied the OTR session.", u"test"_s); // FIXME use correct name
-        break;
-    }
-    case Otr::OtrType::AcknowLedge:
-        break;
-    }
-    return str;
-}
-
-void OtrNotificationJob::slotAcceptOtr()
-{
-    Q_EMIT acceptOtr(mOtr);
-    qDebug() << " void OtrNotificationJob::acceptOtr()";
-    deleteLater();
-}
-
-void OtrNotificationJob::slotRejectOtr()
-{
-    Q_EMIT rejectOtr(mOtr);
-    qDebug() << " Reject ";
-    deleteLater();
-}
-
-const Otr &OtrNotificationJob::otr() const
-{
-    return mOtr;
-}
-
-void OtrNotificationJob::setOtr(const Otr &newOtr)
-{
-    mOtr = newOtr;
-}
-
-#include "moc_otrnotificationjob.cpp"
diff --git a/src/core/otr/otrnotificationjob.h b/src/core/otr/otrnotificationjob.h
deleted file mode 100644
index 548cb6c559..0000000000
--- a/src/core/otr/otrnotificationjob.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2021-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-#pragma once
-
-#include "libruqola_private_export.h"
-#include "otr.h"
-#include <QObject>
-#include <QPointer>
-class RocketChatAccount;
-class LIBRUQOLACORE_TESTS_EXPORT OtrNotificationJob : public QObject
-{
-    Q_OBJECT
-public:
-    explicit OtrNotificationJob(QObject *parent = nullptr);
-    ~OtrNotificationJob() override;
-
-    [[nodiscard]] bool canStart() const;
-
-    void start();
-    [[nodiscard]] const Otr &otr() const;
-    void setOtr(const Otr &newOtr);
-
-    void setRocketChatAccount(RocketChatAccount *account);
-
-Q_SIGNALS:
-    void acceptOtr(const Otr &t);
-    void rejectOtr(const Otr &t);
-    void acknowLedgeOtr(const Otr &t);
-    void endOtr(const Otr &t);
-
-private:
-    void slotAcceptOtr();
-    void slotRejectOtr();
-    [[nodiscard]] QString generateText();
-    Otr mOtr;
-    QPointer<RocketChatAccount> mRocketChatAccount;
-};
diff --git a/src/core/rocketchataccount.cpp b/src/core/rocketchataccount.cpp
index fd9c0f0eb8..c33056e18a 100644
--- a/src/core/rocketchataccount.cpp
+++ b/src/core/rocketchataccount.cpp
@@ -78,7 +78,6 @@
 #include "messagecache.h"
 #include "messages/message.h"
 #include "misc/roleslistjob.h"
-#include "otr/otrmanager.h"
 #include "receivetypingnotificationmanager.h"
 #include "rocketchatbackend.h"
 #include "rocketchatcache.h"
@@ -132,7 +131,6 @@ RocketChatAccount::RocketChatAccount(const QString &accountFileName, QObject *pa
     , mRuqolaServerConfig(new RuqolaServerConfig)
     , mUserCompleterModel(new UserCompleterModel(this))
     , mStatusModel(new StatusModel(this))
-    , mOtrManager(new OtrManager(this, this))
     , mInputTextManager(new InputTextManager(this, this))
     , mInputThreadMessageTextManager(new InputTextManager(this, this))
     , mReceiveTypingNotificationManager(new ReceiveTypingNotificationManager(this))
@@ -2137,13 +2135,6 @@ void RocketChatAccount::parseVideoConference(const QJsonArray &contents)
     mVideoConferenceManager->parseVideoConference(contents);
 }
 
-void RocketChatAccount::parseOtr(const QJsonArray &contents)
-{
-    qCDebug(RUQOLA_LOG) << debugCategoryAccountName() << " void RocketChatAccount::parseOtr(const QJsonArray &contents)" << contents << " account name"
-                        << accountName();
-    mOtrManager->parseOtr(contents);
-}
-
 void RocketChatAccount::sendNotification(const QJsonArray &contents)
 {
     // Conference call
@@ -3446,11 +3437,6 @@ MemoryManager *RocketChatAccount::memoryManager() const
     return mMemoryManager;
 }
 
-void RocketChatAccount::streamNotifyUserOtrEnd(const QByteArray &roomId, const QByteArray &userId)
-{
-    ddp()->streamNotifyUserOtrEnd(QString::fromLatin1(roomId), QString::fromLatin1(userId));
-}
-
 void RocketChatAccount::parseMethodRequested(const QJsonObject &obj, DDPClient::MethodRequestedType type)
 {
     switch (type) {
@@ -3481,9 +3467,6 @@ void RocketChatAccount::parseMethodRequested(const QJsonObject &obj, DDPClient::
     case DDPClient::MethodRequestedType::InputUserChannelAutocomplete:
         inputUserChannelAutocomplete(obj);
         break;
-    case DDPClient::MethodRequestedType::OtrEnd:
-        otrEnd(obj);
-        break;
     case DDPClient::MethodRequestedType::Enable2fa:
         enable2fa(obj);
         break;
@@ -3805,12 +3788,6 @@ void RocketChatAccount::enable2fa(const QJsonObject &root)
     generate2FaTotp(obj);
 }
 
-void RocketChatAccount::otrEnd(const QJsonObject &root)
-{
-    qDebug() << "otr_end  " << root;
-    displayLogInfo("Otr End"_ba, root);
-}
-
 void RocketChatAccount::inputUserChannelAutocomplete(const QJsonObject &root)
 {
     displayLogInfo("Input channel/User autocomplete"_ba, root);
diff --git a/src/core/rocketchataccount.h b/src/core/rocketchataccount.h
index bc1628846b..2ac42d65da 100644
--- a/src/core/rocketchataccount.h
+++ b/src/core/rocketchataccount.h
@@ -46,7 +46,6 @@ class UserCompleterFilterProxyModel;
 class StatusModel;
 class RocketChatCache;
 class EmojiManager;
-class OtrManager;
 class FilesForRoomFilterProxyModel;
 class FilesForRoomModel;
 class InputTextManager;
@@ -253,7 +252,6 @@ public:
     void setServerUrl(const QString &serverUrl);
 
     void sendNotification(const QJsonArray &contents);
-    void parseOtr(const QJsonArray &contents);
 
     void setServerVersion(const QString &version);
 
@@ -410,8 +408,6 @@ public:
 
     void setLastSelectedRoom(const QByteArray &roomId);
 
-    void streamNotifyUserOtrEnd(const QByteArray &roomId, const QByteArray &userId);
-
     void muteUser(const QByteArray &rid, const QString &userId, bool mute);
     void initializeDirectChannel(const QByteArray &rid);
     void delaySelectChannelRequested(const QByteArray &rid);
@@ -613,7 +609,6 @@ private:
     LIBRUQOLACORE_NO_EXPORT void createJitsiConfCall(const QJsonObject &root);
     LIBRUQOLACORE_NO_EXPORT void inputUserChannelAutocompleteThread(const QJsonObject &root);
     LIBRUQOLACORE_NO_EXPORT void inputUserChannelAutocomplete(const QJsonObject &root);
-    LIBRUQOLACORE_NO_EXPORT void otrEnd(const QJsonObject &root);
     LIBRUQOLACORE_NO_EXPORT void enable2fa(const QJsonObject &root);
     LIBRUQOLACORE_NO_EXPORT void regenerateCodes2fa(const QJsonObject &root);
     LIBRUQOLACORE_NO_EXPORT void disable2fa(const QJsonObject &root);
@@ -658,7 +653,6 @@ private:
     UserCompleterFilterProxyModel *mUserCompleterFilterModelProxy = nullptr;
     StatusModel *const mStatusModel;
     RocketChatCache *mCache = nullptr;
-    OtrManager *const mOtrManager;
     InputTextManager *const mInputTextManager;
 
     InputTextManager *const mInputThreadMessageTextManager;
diff --git a/src/core/rocketchatbackend.cpp b/src/core/rocketchatbackend.cpp
index d8a6223477..9ae1f7cb0a 100644
--- a/src/core/rocketchatbackend.cpp
+++ b/src/core/rocketchatbackend.cpp
@@ -478,16 +478,6 @@ void RocketChatBackend::slotChanged(const QJsonObject &object)
                 qCDebug(RUQOLA_BACKEND_LOG) << "WEBRTC CHANGED: " << object;
             }
             qCWarning(RUQOLA_LOG) << "stream-notify-user : WEBRTC ? " << eventname << " contents " << contents;
-        } else if (eventname.endsWith("/otr"_L1)) {
-            if (mRocketChatAccount->ruqolaLogger()) {
-                QJsonDocument d;
-                d.setObject(object);
-                mRocketChatAccount->ruqolaLogger()->dataReceived("stream-notify-user: otr: "_ba + d.toJson());
-            } else {
-                qCDebug(RUQOLA_BACKEND_LOG) << "OTR CHANGED: " << object;
-            }
-            mRocketChatAccount->parseOtr(contents);
-            qCDebug(RUQOLA_UNKNOWN_COLLECTIONTYPE_LOG) << "stream-notify-user : OTR ? " << eventname << " contents " << contents;
         } else if (eventname.endsWith("/message"_L1)) {
             if (mRocketChatAccount->ruqolaLogger()) {
                 QJsonDocument d;
@@ -739,7 +729,6 @@ void RocketChatBackend::subscribeRegistration()
         u"rooms-changed"_s,
         u"subscriptions-changed"_s,
         u"message"_s,
-        u"otr"_s,
         u"webrtc"_s,
         u"video-conference"_s,
         u"userData"_s,
diff --git a/src/core/ruqolaserverconfig.cpp b/src/core/ruqolaserverconfig.cpp
index 9fa2d85223..472cbb3e5a 100644
--- a/src/core/ruqolaserverconfig.cpp
+++ b/src/core/ruqolaserverconfig.cpp
@@ -568,8 +568,6 @@ void RuqolaServerConfig::loadSettings(const QJsonObject &currentConfObject)
         setBlockEditingMessageInMinutes(value.toInt());
     } else if (id == "Message_AllowDeleting_BlockDeleteInMinutes"_L1) {
         setBlockDeletingMessageInMinutes(value.toInt());
-    } else if (id == "OTR_Enable"_L1) {
-        assignSettingValue(value.toBool(), ServerConfigFeatureType::OtrEnabled);
     } else if (id.contains(regularExpressionOAuth)) {
         if (value.toBool()) {
             addOauthService(id);
@@ -768,7 +766,6 @@ QByteArray RuqolaServerConfig::serialize(bool toBinary)
     array.append(createJsonObject(u"Message_AllowEditing"_s, static_cast<bool>(serverConfigFeatureTypes() & ServerConfigFeatureType::AllowEditingMessage)));
     array.append(createJsonObject(u"Message_AllowEditing_BlockEditInMinutes"_s, blockEditingMessageInMinutes()));
     array.append(createJsonObject(u"Message_AllowDeleting_BlockDeleteInMinutes"_s, blockDeletingMessageInMinutes()));
-    array.append(createJsonObject(u"OTR_Enable"_s, static_cast<bool>(serverConfigFeatureTypes() & ServerConfigFeatureType::OtrEnabled)));
     array.append(createJsonObject(u"Site_Url"_s, mSiteUrl));
     array.append(createJsonObject(u"Site_Name"_s, siteName()));
     array.append(createJsonObject(u"E2E_Enable"_s, static_cast<bool>(serverConfigFeatureTypes() & ServerConfigFeatureType::EncryptionEnabled)));
@@ -1199,11 +1196,6 @@ QDebug operator<<(QDebug d, const RuqolaServerConfig::PasswordSettings &t)
     return d;
 }
 
-bool RuqolaServerConfig::otrEnabled() const
-{
-    return mServerConfigFeatureTypes & RuqolaServerConfig::ServerConfigFeatureType::OtrEnabled;
-}
-
 bool RuqolaServerConfig::allowProfileChange() const
 {
     return mServerConfigFeatureTypes & RuqolaServerConfig::ServerConfigFeatureType::AllowUserProfileChange;
diff --git a/src/core/ruqolaserverconfig.h b/src/core/ruqolaserverconfig.h
index 9483969a42..5253e14662 100644
--- a/src/core/ruqolaserverconfig.h
+++ b/src/core/ruqolaserverconfig.h
@@ -68,7 +68,6 @@ public:
     enum ServerConfigFeatureType {
         None = 0,
         AllowEditingMessage = 1,
-        OtrEnabled = 2,
         // NeedAdaptNewSubscriptionRC60 = 4,
         EncryptionEnabled = 8,
         AllowMessagePinning = 0x10,
@@ -274,7 +273,6 @@ public:
     [[nodiscard]] bool allowMessageStarringEnabled() const;
     [[nodiscard]] bool allowMessagePinningEnabled() const;
     [[nodiscard]] bool allowProfileChange() const;
-    [[nodiscard]] bool otrEnabled() const;
     [[nodiscard]] bool allowEditingMessages() const;
     [[nodiscard]] bool uploadFileEnabled() const;
     [[nodiscard]] bool jitsiEnabled() const;
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt
index 596a9ce9e0..e895860810 100644
--- a/src/widgets/CMakeLists.txt
+++ b/src/widgets/CMakeLists.txt
@@ -579,8 +579,6 @@ target_sources(
         notificationhistory/notificationhistorydelegate.cpp
         notificationhistory/notificationhistorylistview.h
         notificationhistory/notificationhistorylistview.cpp
-        otr/otrwidget.cpp
-        otr/otrwidget.h
         prunemessages/prunemessagesdialog.cpp
         prunemessages/prunemessagesdialog.h
         prunemessages/prunemessageswidget.cpp
@@ -1296,7 +1294,6 @@ if(BUILD_TESTING)
     add_subdirectory(exportmessages/autotests)
     add_subdirectory(teams/autotests)
     add_subdirectory(directory/autotests)
-    add_subdirectory(otr/autotests)
     add_subdirectory(switchchannelhistory/autotests)
     add_subdirectory(messagemaximumsizedialog/autotests)
     add_subdirectory(notificationhistory/autotests)
diff --git a/src/widgets/administratorsettingsdialog/autotests/encryptionsettingswidgettest.cpp b/src/widgets/administratorsettingsdialog/autotests/encryptionsettingswidgettest.cpp
index b0110cde41..7d7ec027c9 100644
--- a/src/widgets/administratorsettingsdialog/autotests/encryptionsettingswidgettest.cpp
+++ b/src/widgets/administratorsettingsdialog/autotests/encryptionsettingswidgettest.cpp
@@ -58,13 +58,6 @@ void EncryptionSettingsWidgetTest::shouldHaveDefaultValues()
     QVERIFY(!mAllowUnencryptedMessages->toolTip().isEmpty());
     QCOMPARE(SettingsWidgetHelper::widgetSettingsName(mAllowUnencryptedMessages), u"E2E_Allow_Unencrypted_Messages"_s);
 
-    auto mEnableOtr = w.findChild<QCheckBox *>(u"mEnableOtr"_s);
-    QVERIFY(mEnableOtr);
-    QVERIFY(!mEnableOtr->isChecked());
-    QVERIFY(!mEnableOtr->text().isEmpty());
-    QVERIFY(!mEnableOtr->toolTip().isEmpty());
-    QCOMPARE(SettingsWidgetHelper::widgetSettingsName(mEnableOtr), u"OTR_Enabled"_s);
-
     auto mEnableMentions = w.findChild<QCheckBox *>(u"mEnableMentions"_s);
     QVERIFY(mEnableMentions);
     QVERIFY(!mEnableMentions->isChecked());
diff --git a/src/widgets/administratorsettingsdialog/encryption/encryptionsettingswidget.cpp b/src/widgets/administratorsettingsdialog/encryption/encryptionsettingswidget.cpp
index de03c5d705..6d8c1c5450 100644
--- a/src/widgets/administratorsettingsdialog/encryption/encryptionsettingswidget.cpp
+++ b/src/widgets/administratorsettingsdialog/encryption/encryptionsettingswidget.cpp
@@ -5,13 +5,13 @@
 */
 
 #include "encryptionsettingswidget.h"
-using namespace Qt::Literals::StringLiterals;
 
 #include <QCheckBox>
 #include <QFormLayout>
 
 #include <KLocalizedString>
 
+using namespace Qt::Literals::StringLiterals;
 EncryptionSettingsWidget::EncryptionSettingsWidget(RocketChatAccount *account, QWidget *parent)
     : SettingsWidgetBase{account, parent}
     , mEnableE2E(new QCheckBox(i18nc("@option:check", "Enabled E2E encryption"), this))
@@ -20,7 +20,6 @@ EncryptionSettingsWidget::EncryptionSettingsWidget(RocketChatAccount *account, Q
     , mEnableEncryptFiles(new QCheckBox(i18nc("@option:check", "Encrypt files"), this))
     , mAllowUnencryptedMessages(new QCheckBox(i18nc("@option:check", "Access unencrypted content in encrypted rooms"), this))
     , mEnableMentions(new QCheckBox(i18nc("@option:check", "Mentions"), this))
-    , mEnableOtr(new QCheckBox(i18nc("@option:check", "Enable OTR"), this))
 {
     mEnableE2E->setObjectName(u"mEnableE2E"_s);
     mEnableE2E->setToolTip(
@@ -45,12 +44,6 @@ EncryptionSettingsWidget::EncryptionSettingsWidget(RocketChatAccount *account, Q
     mEnableMentions->setObjectName(u"mEnableMentions"_s);
     mEnableMentions->setToolTip(i18nc("@info:tooltip", "Notify people, and highlight user, channel, and team mentions in encrypted content."));
     addCheckBox(mEnableMentions, u"E2E_Enabled_Mentions"_s);
-
-    mEnableOtr->setObjectName(u"mEnableOtr"_s);
-    mEnableOtr->setToolTip(
-        i18n("Enable option to use off-the-record (OTR) messages in direct messages between 2 users. OTR messages are not recorded on the server and exchanged "
-             "directly and encrypted between the 2 users."));
-    addCheckBox(mEnableOtr, u"OTR_Enabled"_s);
 }
 
 EncryptionSettingsWidget::~EncryptionSettingsWidget() = default;
@@ -63,7 +56,6 @@ void EncryptionSettingsWidget::initialize(const QMap<QString, SettingsWidgetBase
     initializeWidget(mEnableEncryptFiles, mapSettings, true);
     initializeWidget(mAllowUnencryptedMessages, mapSettings, true);
     initializeWidget(mEnableMentions, mapSettings, true);
-    initializeWidget(mEnableOtr, mapSettings);
 }
 
 #include "moc_encryptionsettingswidget.cpp"
diff --git a/src/widgets/administratorsettingsdialog/encryption/encryptionsettingswidget.h b/src/widgets/administratorsettingsdialog/encryption/encryptionsettingswidget.h
index 1838c298af..d4996da552 100644
--- a/src/widgets/administratorsettingsdialog/encryption/encryptionsettingswidget.h
+++ b/src/widgets/administratorsettingsdialog/encryption/encryptionsettingswidget.h
@@ -25,5 +25,4 @@ private:
     QCheckBox *const mEnableEncryptFiles;
     QCheckBox *const mAllowUnencryptedMessages;
     QCheckBox *const mEnableMentions;
-    QCheckBox *const mEnableOtr;
 };
diff --git a/src/widgets/otr/autotests/CMakeLists.txt b/src/widgets/otr/autotests/CMakeLists.txt
deleted file mode 100644
index ffb59ef1a2..0000000000
--- a/src/widgets/otr/autotests/CMakeLists.txt
+++ /dev/null
@@ -1,29 +0,0 @@
-# SPDX-FileCopyrightText: 2021-2026 Laurent Montel <[email protected]>
-# SPDX-License-Identifier: BSD-3-Clause
-macro(add_ruqola_otrwidget_test _source)
-    set(_test ${_source})
-    get_filename_component(_name ${_source} NAME_WE)
-    add_executable(
-        ${_name}
-        ${_test}
-        ${_name}.h
-    )
-    add_test(NAME ${_name} COMMAND ${_name})
-    if(ENABLE_PCH)
-        target_precompile_headers(${_name} REUSE_FROM ruqolawidgetspch_tests)
-    endif()
-    ecm_mark_as_test(${_name})
-    target_link_libraries(
-        ${_name}
-        Qt::Test
-        libruqolawidgets
-    )
-    set_target_properties(
-        ${_name}
-        PROPERTIES
-            DISABLE_PRECOMPILE_HEADERS
-                ON
-    )
-endmacro()
-
-add_ruqola_otrwidget_test(otrwidgettest.cpp)
diff --git a/src/widgets/otr/autotests/otrwidgettest.cpp b/src/widgets/otr/autotests/otrwidgettest.cpp
deleted file mode 100644
index 9a3ea534f4..0000000000
--- a/src/widgets/otr/autotests/otrwidgettest.cpp
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2021-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#include "otrwidgettest.h"
-
-#include "otr/otrwidget.h"
-#include <QAction>
-#include <QTest>
-using namespace Qt::Literals::StringLiterals;
-QTEST_MAIN(OtrWidgetTest)
-OtrWidgetTest::OtrWidgetTest(QObject *parent)
-    : QObject{parent}
-{
-}
-
-void OtrWidgetTest::shouldHaveDefaultValues()
-{
-    OtrWidget w;
-    w.show();
-    // QVERIFY(!w.isVisible());
-    QVERIFY(!w.isCloseButtonVisible());
-    QCOMPARE(w.messageType(), KMessageWidget::Information);
-
-    auto endOtrAction = w.findChild<QAction *>(u"endOtrAction"_s);
-    QVERIFY(endOtrAction);
-    QVERIFY(!endOtrAction->text().isEmpty());
-
-    auto refreshKeysAction = w.findChild<QAction *>(u"refreshKeysAction"_s);
-    QVERIFY(refreshKeysAction);
-    QVERIFY(!refreshKeysAction->text().isEmpty());
-}
-
-#include "moc_otrwidgettest.cpp"
diff --git a/src/widgets/otr/autotests/otrwidgettest.h b/src/widgets/otr/autotests/otrwidgettest.h
deleted file mode 100644
index ff541464c2..0000000000
--- a/src/widgets/otr/autotests/otrwidgettest.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2021-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-#pragma once
-
-#include <QObject>
-
-class OtrWidgetTest : public QObject
-{
-    Q_OBJECT
-public:
-    explicit OtrWidgetTest(QObject *parent = nullptr);
-    ~OtrWidgetTest() override = default;
-private Q_SLOTS:
-    void shouldHaveDefaultValues();
-};
diff --git a/src/widgets/otr/otrwidget.cpp b/src/widgets/otr/otrwidget.cpp
deleted file mode 100644
index af66e7b86b..0000000000
--- a/src/widgets/otr/otrwidget.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2021-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#include "otrwidget.h"
-
-#include <KLocalizedString>
-#include <QAction>
-
-using namespace Qt::Literals::StringLiterals;
-OtrWidget::OtrWidget(QWidget *parent)
-    : KMessageWidget(parent)
-{
-    setVisible(false);
-    setCloseButtonVisible(false);
-    setMessageType(Information);
-    setPosition(KMessageWidget::Header);
-    setText(i18n("Otr Activated"));
-    setTextFormat(Qt::PlainText);
-    auto endOtrAction = new QAction(i18nc("@action", "End OTR"), this);
-    endOtrAction->setObjectName(u"endOtrAction"_s);
-    connect(endOtrAction, &QAction::triggered, this, &OtrWidget::closeOtr);
-    addAction(endOtrAction);
-
-    auto refreshKeysAction = new QAction(i18nc("@action", "Refresh Keys"), this);
-    refreshKeysAction->setObjectName(u"refreshKeysAction"_s);
-    connect(refreshKeysAction, &QAction::triggered, this, &OtrWidget::refreshKeys);
-    addAction(refreshKeysAction);
-}
-
-OtrWidget::~OtrWidget() = default;
-
-#include "moc_otrwidget.cpp"
diff --git a/src/widgets/otr/otrwidget.h b/src/widgets/otr/otrwidget.h
deleted file mode 100644
index 990fbc9676..0000000000
--- a/src/widgets/otr/otrwidget.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-   SPDX-FileCopyrightText: 2021-2026 Laurent Montel <[email protected]>
-
-   SPDX-License-Identifier: LGPL-2.0-or-later
-*/
-
-#pragma once
-
-#include "libruqolawidgets_private_export.h"
-#include <KMessageWidget>
-
-class LIBRUQOLAWIDGETS_TESTS_EXPORT OtrWidget : public KMessageWidget
-{
-    Q_OBJECT
-public:
-    explicit OtrWidget(QWidget *parent = nullptr);
-    ~OtrWidget() override;
-
-Q_SIGNALS:
-    void refreshKeys();
-    void closeOtr();
-};
diff --git a/src/widgets/room/channelactionpopupmenu.cpp b/src/widgets/room/channelactionpopupmenu.cpp
index 7b7d7d3d02..32aec25579 100644
--- a/src/widgets/room/channelactionpopupmenu.cpp
+++ b/src/widgets/room/channelactionpopupmenu.cpp
@@ -123,13 +123,6 @@ void ChannelActionPopupMenu::createMenu()
         Q_EMIT actionRequested(RoomHeaderWidget::ExportMessages);
     });
 
-    mMenu->addSeparator();
-    mOffTheRecordMessages = new QAction(i18nc("@action", "OTR"), this);
-    mOffTheRecordMessages->setCheckable(true);
-    mMenu->addAction(mOffTheRecordMessages);
-    connect(mOffTheRecordMessages, &QAction::triggered, this, [this]() {
-        Q_EMIT actionRequested(RoomHeaderWidget::OtrMessages);
-    });
     mMenu->addSeparator();
     mEncryptMessages = new QAction(i18nc("@action", "Encrypt Messages"), this);
     mEncryptMessages->setCheckable(true);
@@ -209,10 +202,6 @@ void ChannelActionPopupMenu::slotUpdateMenu()
 
         mExportMessages->setVisible(mCurrentRocketChatAccount->hasPermission(u"mail-messages"_s));
 
-        // FIXME Disable for the moment
-        mOffTheRecordMessages->setVisible(false && mCurrentRocketChatAccount->ruqolaServerConfig()->otrEnabled()
-                                          && mRoom->channelType() == Room::RoomType::Direct);
-
         mEncryptMessages->setVisible(mRoom->encryptedEnabled()); // Hide when not private channels or not direct
         mEncryptMessages->setChecked(mRoom->encrypted());
 
diff --git a/src/widgets/room/channelactionpopupmenu.h b/src/widgets/room/channelactionpopupmenu.h
index 1d00d82efe..6fb67bf511 100644
--- a/src/widgets/room/channelactionpopupmenu.h
+++ b/src/widgets/room/channelactionpopupmenu.h
@@ -51,7 +51,6 @@ private:
     QAction *mPruneMessages = nullptr;
     QAction *mPruneMessagesSeparator = nullptr;
     QAction *mExportMessages = nullptr;
-    QAction *mOffTheRecordMessages = nullptr;
     QAction *mEncryptMessages = nullptr;
     QAction *mShowBannedUsers = nullptr;
 
diff --git a/src/widgets/room/roomheaderwidget.h b/src/widgets/room/roomheaderwidget.h
index d944e426ed..bb7fd26faf 100644
--- a/src/widgets/room/roomheaderwidget.h
+++ b/src/widgets/room/roomheaderwidget.h
@@ -38,10 +38,9 @@ public:
         VideoChat = 11,
         PruneMessages = 12,
         ExportMessages = 13,
-        OtrMessages = 14,
-        EncryptMessages = 15,
-        UnEncryptMessages = 16,
-        ShowBannedUsers = 17,
+        EncryptMessages = 14,
+        UnEncryptMessages = 15,
+        ShowBannedUsers = 16,
     };
     Q_ENUM(ChannelActionType)
 
diff --git a/src/widgets/room/roomwidget.cpp b/src/widgets/room/roomwidget.cpp
index 2d17a84ccc..120c5863e9 100644
--- a/src/widgets/room/roomwidget.cpp
+++ b/src/widgets/room/roomwidget.cpp
@@ -46,7 +46,6 @@
 
 #include "offlinewidget/offlinewidget.h"
 
-#include "otr/otrwidget.h"
 #include "reconnectinfowidget.h"
 #include "rocketchataccountsettings.h"
 #include "roomcounterinfowidget.h"
@@ -220,17 +219,6 @@ void RoomWidget::createOffLineWidget()
     mRoomWidgetLayout->insertWidget(1, mOffLineWidget);
 }
 
-// TODO using it.
-void RoomWidget::createOtrWidget()
-{
-    mOtrWidget = new OtrWidget(this);
-    mOtrWidget->setObjectName(u"mOtrWidget"_s);
-    connect(mOtrWidget, &OtrWidget::closeOtr, this, &RoomWidget::slotCloseOtr);
-    connect(mOtrWidget, &OtrWidget::refreshKeys, this, &RoomWidget::slotRefreshOtrKeys);
-    // After mUsersInRoomFlowWidget
-    mRoomWidgetLayout->insertWidget(1, mOtrWidget);
-}
-
 void RoomWidget::createE2eSaveEncryptionKeyWidget()
 {
     if (mCurrentRocketChatAccount && !mCurrentRocketChatAccount->e2eKeyManager()->keySaved()) {
@@ -385,9 +373,6 @@ void RoomWidget::slotActionRequested(RoomHeaderWidget::ChannelActionType type)
     case RoomHeaderWidget::ExportMessages:
         slotExportMessages();
         break;
-    case RoomHeaderWidget::OtrMessages:
-        // TODO
-        break;
     case RoomHeaderWidget::EncryptMessages:
         slotEncryptedChanged(true);
         break;
@@ -1250,16 +1235,6 @@ void RoomWidget::slotDisplayReconnectWidget(int seconds)
     }
 }
 
-void RoomWidget::slotCloseOtr()
-{
-    mCurrentRocketChatAccount->streamNotifyUserOtrEnd(roomId(), mCurrentRocketChatAccount->userId());
-}
-
-void RoomWidget::slotRefreshOtrKeys()
-{
-    // TODO
-}
-
 void RoomWidget::slotOfflineModeChanged()
 {
 #if ADD_OFFLINE_SUPPORT
diff --git a/src/widgets/room/roomwidget.h b/src/widgets/room/roomwidget.h
index 0e8358fbc5..5c1d6ece65 100644
--- a/src/widgets/room/roomwidget.h
+++ b/src/widgets/room/roomwidget.h
@@ -22,7 +22,6 @@ class UsersInRoomFlowWidget;
 class RoomCounterInfoWidget;
 class RoomWidgetBase;
 class ReconnectInfoWidget;
-class OtrWidget;
 class OffLineWidget;
 class PluginTextMessageWidget;
 class E2eSaveEncryptionKeyWidget;
@@ -108,10 +107,7 @@ private:
     LIBRUQOLAWIDGETS_NO_EXPORT void slotTryReconnect();
     LIBRUQOLAWIDGETS_NO_EXPORT void slotDisplayReconnectWidget(int seconds);
     LIBRUQOLAWIDGETS_NO_EXPORT void slotLoginStatusChanged();
-    LIBRUQOLAWIDGETS_NO_EXPORT void slotCloseOtr();
-    LIBRUQOLAWIDGETS_NO_EXPORT void slotRefreshOtrKeys();
     LIBRUQOLAWIDGETS_NO_EXPORT void slotCallRequested();
-    LIBRUQOLAWIDGETS_NO_EXPORT void createOtrWidget();
     LIBRUQOLAWIDGETS_NO_EXPORT void createOffLineWidget();
     LIBRUQOLAWIDGETS_NO_EXPORT void createRoomReconnectInfoWidget();
     LIBRUQOLAWIDGETS_NO_EXPORT void createPluginTextMessageWidget();
@@ -140,7 +136,6 @@ private:
     RoomCounterInfoWidget *const mRoomCounterInfoWidget;
     ReconnectInfoWidget *mRoomReconnectInfoWidget = nullptr;
     PluginTextMessageWidget *mPluginTextMessageWidget = nullptr;
-    OtrWidget *mOtrWidget = nullptr;
     OffLineWidget *mOffLineWidget = nullptr;
     TextEditTextToSpeech::TextToSpeechContainerWidget *const mTextToSpeechWidget = nullptr;
     QPointer<RocketChatAccount> mCurrentRocketChatAccount;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.