From 3b03cfed5357c98764d8e862dd7ae5015c3dd92e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 13 Mar 2026 18:28:31 -0600 Subject: [PATCH 1/2] Fix zeroing out remote quarantined media count --- synapse/storage/databases/main/room.py | 1 - 1 file changed, 1 deletion(-) diff --git a/synapse/storage/databases/main/room.py b/synapse/storage/databases/main/room.py index 633df077367..7ac88e4c2aa 100644 --- a/synapse/storage/databases/main/room.py +++ b/synapse/storage/databases/main/room.py @@ -1217,7 +1217,6 @@ def _quarantine_remote_media_txn( txn.execute(sql, [quarantined_by] + sql_args) total_media_quarantined += txn.rowcount if txn.rowcount > 0 else 0 - total_media_quarantined = 0 if hashes: sql_many_clause_sql, sql_many_clause_args = make_in_list_sql_clause( txn.database_engine, "sha256", hashes From 98f9f8155e9cc81b760723ba716b88acb06a4c2e Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 13 Mar 2026 18:31:04 -0600 Subject: [PATCH 2/2] changelog --- changelog.d/19559.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/19559.bugfix diff --git a/changelog.d/19559.bugfix b/changelog.d/19559.bugfix new file mode 100644 index 00000000000..f64a84e8e02 --- /dev/null +++ b/changelog.d/19559.bugfix @@ -0,0 +1 @@ +Fix quarantine media admin APIs sometimes returning inaccurate counts for remote media. \ No newline at end of file