From 988fe159fc4b098be01f6b63e12d6367c14923e3 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 3 Mar 2021 12:10:07 +0100 Subject: [PATCH 1/3] Check the correct endpoint for listed conversations Signed-off-by: Joas Schilling --- tests/integration/features/bootstrap/FeatureContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/features/bootstrap/FeatureContext.php b/tests/integration/features/bootstrap/FeatureContext.php index 9486584223a..f46ebfb2d32 100644 --- a/tests/integration/features/bootstrap/FeatureContext.php +++ b/tests/integration/features/bootstrap/FeatureContext.php @@ -157,7 +157,7 @@ public function userCannotFindAnyListedRooms($user, $apiVersion = 'v3') { */ public function userCannotFindAnyListedRoomsWithStatus($user, $statusCode, $apiVersion = 'v3') { $this->setCurrentUser($user); - $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/room'); + $this->sendRequest('GET', '/apps/spreed/api/' . $apiVersion . '/listed-room'); $this->assertStatusCode($this->response, $statusCode); } From 901a7906ab1c6aba3d1cc188057e97f354bf4bfd Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 3 Mar 2021 12:10:44 +0100 Subject: [PATCH 2/3] Always go through the wrapper function Signed-off-by: Joas Schilling --- lib/Controller/RoomController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php index ba1ee4b1ae2..8b41924cffb 100644 --- a/lib/Controller/RoomController.php +++ b/lib/Controller/RoomController.php @@ -235,7 +235,7 @@ public function getListedRooms(string $searchTerm = ''): DataResponse { $return = []; foreach ($rooms as $room) { try { - $return[] = $this->formatRoomV2andV3($room, null); + $return[] = $this->formatRoom($room, null); } catch (RoomNotFoundException $e) { } catch (\RuntimeException $e) { } From 49c504ee8befc0628564f4cabed3723c0a7efc6d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 3 Mar 2021 12:11:07 +0100 Subject: [PATCH 3/3] Don't create an unused event Signed-off-by: Joas Schilling --- lib/Controller/RoomController.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php index 8b41924cffb..e54c6923a09 100644 --- a/lib/Controller/RoomController.php +++ b/lib/Controller/RoomController.php @@ -228,8 +228,6 @@ public function getRooms(int $noStatusUpdate = 0): DataResponse { * @return DataResponse */ public function getListedRooms(string $searchTerm = ''): DataResponse { - $event = new UserEvent($this->userId); - $rooms = $this->manager->getListedRoomsForUser($this->userId, $searchTerm); $return = [];