[network/ruqola] src/core: Prepare to implement encrypt message

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

Prepare to implement encrypt message

M  +7    -0    src/core/rocketchataccount.cpp

https://invent.kde.org/network/ruqola/-/commit/b232dac9afe66c6452d385f8dfd0f43dd60ef322

diff --git a/src/core/rocketchataccount.cpp b/src/core/rocketchataccount.cpp
index 000fdbc13b..50c0972d27 100644
--- a/src/core/rocketchataccount.cpp
+++ b/src/core/rocketchataccount.cpp
@@ -536,6 +536,13 @@ void RocketChatAccount::reactOnMessage(const QByteArray &messageId, const QStrin
 
 void RocketChatAccount::sendMessage(const QByteArray &roomID, const QString &message)
 {
+    Room *const room = mRoomModel->findRoom(roomID);
+    if (room && room->encrypted()) {
+        const QByteArray sessionKey = room->sessionKey();
+        if (!sessionKey.isEmpty()) {
+            // TODO mE2eKeyManager->cr
+        }
+    }
     restApi()->postMessage(roomID, message);
     markRoomAsRead(roomID);
 }
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.