diff --git a/docs/admin_api/room_reports.md b/docs/admin_api/room_reports.md index 77d8fdfa7a..83a03d9131 100644 --- a/docs/admin_api/room_reports.md +++ b/docs/admin_api/room_reports.md @@ -45,7 +45,7 @@ set to the value of `next_token`. This will return a new page. If the endpoint does not return a `next_token` then there are no more reports to paginate through. -**URL parameters:** +**Query parameters:** * `limit`: integer - Is optional but is used for pagination, denoting the maximum number of items to return in this call. Defaults to `100`. diff --git a/synapse/rest/admin/room_reports.py b/synapse/rest/admin/room_reports.py index e2f69b64cd..1b1f55e892 100644 --- a/synapse/rest/admin/room_reports.py +++ b/synapse/rest/admin/room_reports.py @@ -11,11 +11,6 @@ # See the GNU Affero General Public License for more details: # . # -# Originally licensed under the Apache License, Version 2.0: -# . -# -# [This file includes modifications made by New Vector Limited] -# # import logging diff --git a/tests/rest/admin/test_room_reports.py b/tests/rest/admin/test_room_reports.py index 80b6b0ed88..6bc4023046 100644 --- a/tests/rest/admin/test_room_reports.py +++ b/tests/rest/admin/test_room_reports.py @@ -11,12 +11,6 @@ # See the GNU Affero General Public License for more details: # . # -# Originally licensed under the Apache License, Version 2.0: -# . -# -# [This file includes modifications made by New Vector Limited] -# -# from typing import List from twisted.test.proto_helpers import MemoryReactor @@ -366,7 +360,7 @@ class RoomReportsTestCase(unittest.HomeserverTestCase): """Report a room""" channel = self.make_request( "POST", - "rooms/%s/report" % room_id, + f"/_matrix/client/v3/rooms/{room_id}/report", {"reason": "this makes me sad"}, access_token=user_tok, ) @@ -376,7 +370,7 @@ class RoomReportsTestCase(unittest.HomeserverTestCase): """Report a room, but omit reason""" channel = self.make_request( "POST", - "rooms/%s/report" % room_id, + f"/_matrix/client/v3/rooms/{room_id}/report", {}, access_token=user_tok, ) @@ -393,6 +387,8 @@ class RoomReportsTestCase(unittest.HomeserverTestCase): self.assertIn("name", c) self.assertIn("reason", c) + self.assertEqual(len(c.keys()), 7) + def test_count_correct_despite_table_deletions(self) -> None: """ Tests that the count matches the number of rows, even if rows in joined tables