[network/ruqola] src/rocketchatrestapi-qt: Fix job

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

Fix job

M  +2    -2    src/rocketchatrestapi-qt/CMakeLists.txt
M  +1    -1    src/rocketchatrestapi-qt/autotests/CMakeLists.txt
M  +4    -3    src/rocketchatrestapi-qt/e2e/provideuserswithsuggestedgroupkeysjob.cpp

https://invent.kde.org/network/ruqola/-/commit/30b69ebe7b2e34a15c4c87c6286b08bc68b10f86

diff --git a/src/rocketchatrestapi-qt/CMakeLists.txt b/src/rocketchatrestapi-qt/CMakeLists.txt
index e2ff3c63e4..539cf06705 100644
--- a/src/rocketchatrestapi-qt/CMakeLists.txt
+++ b/src/rocketchatrestapi-qt/CMakeLists.txt
@@ -199,8 +199,8 @@ target_sources(
         e2e/resetroomkeyjob.h
         e2e/provideuserswithsuggestedgroupkeysjob.cpp
         e2e/provideuserswithsuggestedgroupkeysjob.h
-        e2e/getusersofroomwithoutkey.h
-        e2e/getusersofroomwithoutkey.cpp
+        e2e/getusersofroomwithoutkeyjob.h
+        e2e/getusersofroomwithoutkeyjob.cpp
         e2e/fetchuserswaitingforgroupkeyjob.h
         e2e/fetchuserswaitingforgroupkeyjob.cpp
         e2e/setroomkeyidjob.cpp
diff --git a/src/rocketchatrestapi-qt/autotests/CMakeLists.txt b/src/rocketchatrestapi-qt/autotests/CMakeLists.txt
index 0241183824..0e52982acf 100644
--- a/src/rocketchatrestapi-qt/autotests/CMakeLists.txt
+++ b/src/rocketchatrestapi-qt/autotests/CMakeLists.txt
@@ -309,7 +309,7 @@ add_rocketchatrestapi_test(acceptsuggestedgroupkeyjobtest.cpp)
 add_rocketchatrestapi_test(rejectsuggestedgroupkeyjobtest.cpp)
 add_rocketchatrestapi_test(resetroomkeyjobtest.cpp)
 add_rocketchatrestapi_test(previewscommandjobtest.cpp)
-add_rocketchatrestapi_test(getusersofroomwithoutkeytest.cpp)
+add_rocketchatrestapi_test(getusersofroomwithoutkeyjobtest.cpp)
 add_rocketchatrestapi_test(roomsmediaconfirmjobtest.cpp)
 add_rocketchatrestapi_test(subscriptiongetonejobtest.cpp)
 add_rocketchatrestapi_test(subscriptiongetalljobtest.cpp)
diff --git a/src/rocketchatrestapi-qt/e2e/provideuserswithsuggestedgroupkeysjob.cpp b/src/rocketchatrestapi-qt/e2e/provideuserswithsuggestedgroupkeysjob.cpp
index 00afc6ed8f..105d6befcf 100644
--- a/src/rocketchatrestapi-qt/e2e/provideuserswithsuggestedgroupkeysjob.cpp
+++ b/src/rocketchatrestapi-qt/e2e/provideuserswithsuggestedgroupkeysjob.cpp
@@ -83,15 +83,16 @@ QNetworkRequest ProvideUsersWithSuggestedGroupKeysJob::request() const
 QJsonDocument ProvideUsersWithSuggestedGroupKeysJob::json() const
 {
     QJsonObject obj;
-    obj["rid"_L1] = mRoomId;
+    QJsonObject usersSuggestedGroupKeys;
     QJsonArray keysArr;
     for (const auto &k : mSuggestedGroupKeys) {
         QJsonObject keyObj;
-        keyObj["userId"_L1] = k.userId;
+        keyObj["_id"_L1] = k.userId;
         keyObj["key"_L1] = k.encryptedKey;
         keysArr.append(keyObj);
     }
-    obj["keys"_L1] = keysArr;
+    usersSuggestedGroupKeys.insert(mRoomId, keysArr);
+    obj["usersSuggestedGroupKeys"_L1] = usersSuggestedGroupKeys;
     return QJsonDocument(obj);
 }
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.