mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-21 05:24:06 +01:00
Only count aggregations from distinct senders
As a user isn't allowed to send a single emoji more than once.
This commit is contained in:
parent
d4ca533d70
commit
b63cc325a9
1 changed files with 1 additions and 1 deletions
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue