diff options
author | Erik Johnston <erik@matrix.org> | 2020-01-15 18:13:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-15 18:13:47 +0000 |
commit | 19a1aac48cc83fe41287a97bb0a96280a0e8c565 (patch) | |
tree | 57842e7ba7899321ba1393501f94ac5befea6da6 | |
parent | Remove duplicate session check in web fallback servlet (#6702) (diff) | |
download | synapse-19a1aac48cc83fe41287a97bb0a96280a0e8c565.tar.xz |
Fix purge_room admin API (#6711)
-rw-r--r-- | changelog.d/6711.bugfix | 1 | ||||
-rw-r--r-- | synapse/storage/purge_events.py | 2 | ||||
-rw-r--r-- | tests/rest/admin/test_admin.py | 4 |
3 files changed, 3 insertions, 4 deletions
diff --git a/changelog.d/6711.bugfix b/changelog.d/6711.bugfix new file mode 100644 index 0000000000..c70506bd88 --- /dev/null +++ b/changelog.d/6711.bugfix @@ -0,0 +1 @@ +Fix `purge_room` admin API. diff --git a/synapse/storage/purge_events.py b/synapse/storage/purge_events.py index d6a7bd7834..fdc0abf5cf 100644 --- a/synapse/storage/purge_events.py +++ b/synapse/storage/purge_events.py @@ -34,7 +34,7 @@ class PurgeEventsStorage(object): """ state_groups_to_delete = yield self.stores.main.purge_room(room_id) - yield self.stores.main.purge_room_state(room_id, state_groups_to_delete) + yield self.stores.state.purge_room_state(room_id, state_groups_to_delete) @defer.inlineCallbacks def purge_history(self, room_id, token, delete_local_events): diff --git a/tests/rest/admin/test_admin.py b/tests/rest/admin/test_admin.py index 7a7e898843..f3b4a31e21 100644 --- a/tests/rest/admin/test_admin.py +++ b/tests/rest/admin/test_admin.py @@ -337,7 +337,7 @@ class PurgeRoomTestCase(unittest.HomeserverTestCase): "local_invites", "room_account_data", "room_tags", - "state_groups", + # "state_groups", # Current impl leaves orphaned state groups around. "state_groups_state", ): count = self.get_success( @@ -351,8 +351,6 @@ class PurgeRoomTestCase(unittest.HomeserverTestCase): self.assertEqual(count, 0, msg="Rows not purged in {}".format(table)) - test_purge_room.skip = "Disabled because it's currently broken" - class QuarantineMediaTestCase(unittest.HomeserverTestCase): """Test /quarantine_media admin API. |