Skip to content
Snippets Groups Projects
Unverified Commit f4c80d70 authored by Erik Johnston's avatar Erik Johnston Committed by GitHub
Browse files

Merge pull request #5203 from matrix-org/erikj/aggregate_by_sender

Only count aggregations from distinct senders
parents 9526aa96 9259cd4b
Branches
Tags
No related merge requests found
Add experimental support for relations (aka reactions and edits).
...@@ -280,7 +280,7 @@ class RelationsWorkerStore(SQLBaseStore): ...@@ -280,7 +280,7 @@ class RelationsWorkerStore(SQLBaseStore):
having_clause = "" having_clause = ""
sql = """ sql = """
SELECT type, aggregation_key, COUNT(*), MAX(stream_ordering) SELECT type, aggregation_key, COUNT(DISTINCT sender), MAX(stream_ordering)
FROM event_relations FROM event_relations
INNER JOIN events USING (event_id) INNER JOIN events USING (event_id)
WHERE {where_clause} WHERE {where_clause}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment