Skip to content
Snippets Groups Projects
Commit b63cc325 authored by Erik Johnston's avatar Erik Johnston
Browse files

Only count aggregations from distinct senders

As a user isn't allowed to send a single emoji more than once.
parent d4ca533d
No related branches found
No related tags found
No related merge requests found
......@@ -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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment