summary refs log tree commit diff
diff options
context:
space:
mode:
authorMathieu Velten <mathieuv@matrix.org>2023-07-03 10:40:31 +0200
committerMathieu Velten <mathieuv@matrix.org>2023-07-03 10:40:31 +0200
commit1d6f3c542909a93ab7b4c4f65ad95aa1dc1b45de (patch)
tree96d416ba1ac56ad36beb8a7149eea243900d7140
parentFix purge history response format (diff)
downloadsynapse-1d6f3c542909a93ab7b4c4f65ad95aa1dc1b45de.tar.xz
Add log
-rw-r--r--synapse/handlers/pagination.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/synapse/handlers/pagination.py b/synapse/handlers/pagination.py
index 2cf9c57659..6ae0cdcabe 100644
--- a/synapse/handlers/pagination.py
+++ b/synapse/handlers/pagination.py
@@ -476,9 +476,14 @@ class PaginationHandler:
 
         async with self.pagination_lock.write(room_id):
             # first check that we have no users in this room
-            if not force:
-                joined = await self.store.is_host_joined(room_id, self._server_name)
-                if joined:
+            joined = await self.store.is_host_joined(room_id, self._server_name)
+            if joined:
+                if force:
+                    logger.info(
+                        "force-purging room %s with some local users still joined",
+                        room_id,
+                    )
+                else:
                     raise SynapseError(400, "Users are still joined to this room")
 
             await self.store.upsert_room_to_delete(