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

Commit 8b60329

Browse files
authored
Remove unused argument for get_relations_for_event. (#13383)
1 parent 549c556 commit 8b60329

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

changelog.d/13383.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Remove an unused argument to `get_relations_for_event`.

synapse/handlers/relations.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ async def get_relations(
7373
room_id: str,
7474
relation_type: Optional[str] = None,
7575
event_type: Optional[str] = None,
76-
aggregation_key: Optional[str] = None,
7776
limit: int = 5,
7877
direction: str = "b",
7978
from_token: Optional[StreamToken] = None,
@@ -89,7 +88,6 @@ async def get_relations(
8988
room_id: The room the event belongs to.
9089
relation_type: Only fetch events with this relation type, if given.
9190
event_type: Only fetch events with this event type, if given.
92-
aggregation_key: Only fetch events with this aggregation key, if given.
9391
limit: Only fetch the most recent `limit` events.
9492
direction: Whether to fetch the most recent first (`"b"`) or the
9593
oldest first (`"f"`).
@@ -122,7 +120,6 @@ async def get_relations(
122120
room_id=room_id,
123121
relation_type=relation_type,
124122
event_type=event_type,
125-
aggregation_key=aggregation_key,
126123
limit=limit,
127124
direction=direction,
128125
from_token=from_token,

synapse/storage/databases/main/relations.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ async def get_relations_for_event(
6262
room_id: str,
6363
relation_type: Optional[str] = None,
6464
event_type: Optional[str] = None,
65-
aggregation_key: Optional[str] = None,
6665
limit: int = 5,
6766
direction: str = "b",
6867
from_token: Optional[StreamToken] = None,
@@ -76,7 +75,6 @@ async def get_relations_for_event(
7675
room_id: The room the event belongs to.
7776
relation_type: Only fetch events with this relation type, if given.
7877
event_type: Only fetch events with this event type, if given.
79-
aggregation_key: Only fetch events with this aggregation key, if given.
8078
limit: Only fetch the most recent `limit` events.
8179
direction: Whether to fetch the most recent first (`"b"`) or the
8280
oldest first (`"f"`).
@@ -105,10 +103,6 @@ async def get_relations_for_event(
105103
where_clause.append("type = ?")
106104
where_args.append(event_type)
107105

108-
if aggregation_key:
109-
where_clause.append("aggregation_key = ?")
110-
where_args.append(aggregation_key)
111-
112106
pagination_clause = generate_pagination_where_clause(
113107
direction=direction,
114108
column_names=("topological_ordering", "stream_ordering"),

0 commit comments

Comments
 (0)