diff options
author | Erik Johnston <erik@matrix.org> | 2019-05-17 18:01:39 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-05-17 18:03:10 +0100 |
commit | b63cc325a9362874a13f0079589afccd7d108f1f (patch) | |
tree | fb732ab51ca00292646bc27b71934893b82965ef | |
parent | Make tests use different user for each reaction it sends (diff) | |
download | synapse-b63cc325a9362874a13f0079589afccd7d108f1f.tar.xz |
Only count aggregations from distinct senders
As a user isn't allowed to send a single emoji more than once.
-rw-r--r-- | synapse/storage/relations.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/relations.py b/synapse/storage/relations.py index 6e216066ab..42f587a7d8 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} |