mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-30 07:56:11 -05:00
Merge pull request #5203 from matrix-org/erikj/aggregate_by_sender
Only count aggregations from distinct senders
This commit is contained in:
commit
f4c80d70f8
1
changelog.d/5203.feature
Normal file
1
changelog.d/5203.feature
Normal file
@ -0,0 +1 @@
|
|||||||
|
Add experimental support for relations (aka reactions and edits).
|
@ -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}
|
||||||
|
Loading…
Reference in New Issue
Block a user