summary refs log tree commit diff
path: root/synapse/storage/databases/main/stats.py
diff options
context:
space:
mode:
authorShay <hillerys@element.io>2023-07-23 16:30:54 -0700
committerGitHub <noreply@github.com>2023-07-23 16:30:54 -0700
commitf08d05dd2ce8ab38240cfa691b07a27cff0356e9 (patch)
treebb318a4a923a5268befd06a60fe36960088c776d /synapse/storage/databases/main/stats.py
parentBuild packages for Debian Trixie (#15961) (diff)
downloadsynapse-f08d05dd2ce8ab38240cfa691b07a27cff0356e9.tar.xz
Actually stop reading from column `user_id` of tables `profiles` (#15955)
Diffstat (limited to 'synapse/storage/databases/main/stats.py')
-rw-r--r--synapse/storage/databases/main/stats.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/stats.py b/synapse/storage/databases/main/stats.py
index 97c4dc2603..f34b7ce8f4 100644
--- a/synapse/storage/databases/main/stats.py
+++ b/synapse/storage/databases/main/stats.py
@@ -697,7 +697,7 @@ class StatsStore(StateDeltasStore):
             txn: LoggingTransaction,
         ) -> Tuple[List[JsonDict], int]:
             filters = []
-            args = [self.hs.config.server.server_name]
+            args: list = []
 
             if search_term:
                 filters.append("(lmr.user_id LIKE ? OR displayname LIKE ?)")
@@ -733,7 +733,7 @@ class StatsStore(StateDeltasStore):
 
             sql_base = """
                 FROM local_media_repository as lmr
-                LEFT JOIN profiles AS p ON lmr.user_id = '@' || p.user_id || ':' || ?
+                LEFT JOIN profiles AS p ON lmr.user_id = p.full_user_id
                 {}
                 GROUP BY lmr.user_id, displayname
             """.format(