mirror of
https://github.com/element-hq/synapse
synced 2024-08-20 01:30:20 +00:00
Fix purge_room admin API (#6711)
This commit is contained in:
parent
edc244eec4
commit
19a1aac48c
3 changed files with 3 additions and 4 deletions
1
changelog.d/6711.bugfix
Normal file
1
changelog.d/6711.bugfix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Fix `purge_room` admin API.
|
|
@ -34,7 +34,7 @@ class PurgeEventsStorage(object):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
state_groups_to_delete = yield self.stores.main.purge_room(room_id)
|
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
|
@defer.inlineCallbacks
|
||||||
def purge_history(self, room_id, token, delete_local_events):
|
def purge_history(self, room_id, token, delete_local_events):
|
||||||
|
|
|
@ -337,7 +337,7 @@ class PurgeRoomTestCase(unittest.HomeserverTestCase):
|
||||||
"local_invites",
|
"local_invites",
|
||||||
"room_account_data",
|
"room_account_data",
|
||||||
"room_tags",
|
"room_tags",
|
||||||
"state_groups",
|
# "state_groups", # Current impl leaves orphaned state groups around.
|
||||||
"state_groups_state",
|
"state_groups_state",
|
||||||
):
|
):
|
||||||
count = self.get_success(
|
count = self.get_success(
|
||||||
|
@ -351,8 +351,6 @@ class PurgeRoomTestCase(unittest.HomeserverTestCase):
|
||||||
|
|
||||||
self.assertEqual(count, 0, msg="Rows not purged in {}".format(table))
|
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):
|
class QuarantineMediaTestCase(unittest.HomeserverTestCase):
|
||||||
"""Test /quarantine_media admin API.
|
"""Test /quarantine_media admin API.
|
||||||
|
|
Loading…
Reference in a new issue