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

Only count aggregations from distinct senders
This commit is contained in:
Erik Johnston 2019-05-21 17:10:48 +01:00 committed by GitHub
commit f4c80d70f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/5203.feature Normal file
View File

@ -0,0 +1 @@
Add experimental support for relations (aka reactions and edits).

View File

@ -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}