Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5203 from matrix-org/erikj/aggregate_by_sender
Browse files Browse the repository at this point in the history
Only count aggregations from distinct senders
  • Loading branch information
erikjohnston authored May 21, 2019
2 parents 9526aa9 + 9259cd4 commit f4c80d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/5203.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add experimental support for relations (aka reactions and edits).
2 changes: 1 addition & 1 deletion synapse/storage/relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def get_aggregation_groups_for_event(
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}
Expand Down

0 comments on commit f4c80d7

Please sign in to comment.