summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-05-21 17:10:48 +0100
committerGitHub <noreply@github.com>2019-05-21 17:10:48 +0100
commitf4c80d70f86d7573ff5e3c57a82126cc765fcafb (patch)
tree91db97c52ae7154e67233f9161406c8f50b45281 /synapse/storage
parentMerge pull request #5212 from matrix-org/erikj/deny_multiple_reactions (diff)
parentNewsfile (diff)
downloadsynapse-f4c80d70f86d7573ff5e3c57a82126cc765fcafb.tar.xz
Merge pull request #5203 from matrix-org/erikj/aggregate_by_sender
Only count aggregations from distinct senders
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/relations.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/relations.py b/synapse/storage/relations.py
index 7d51b38d77..4c83800cca 100644
--- a/synapse/storage/relations.py
+++ b/synapse/storage/relations.py
@@ -280,7 +280,7 @@ class RelationsWorkerStore(SQLBaseStore):
             having_clause = ""
 
         sql = """
-            SELECT type, aggregation_key, COUNT(*), MAX(stream_ordering)
+            SELECT type, aggregation_key, COUNT(DISTINCT sender), MAX(stream_ordering)
             FROM event_relations
             INNER JOIN events USING (event_id)
             WHERE {where_clause}