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

Remove unused argument for get_relations_for_event. #13383

Merged
merged 2 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/13383.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove an unused argument to `get_relations_for_event`.
3 changes: 0 additions & 3 deletions synapse/handlers/relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ async def get_relations(
room_id: str,
relation_type: Optional[str] = None,
event_type: Optional[str] = None,
aggregation_key: Optional[str] = None,
limit: int = 5,
direction: str = "b",
from_token: Optional[StreamToken] = None,
Expand All @@ -89,7 +88,6 @@ async def get_relations(
room_id: The room the event belongs to.
relation_type: Only fetch events with this relation type, if given.
event_type: Only fetch events with this event type, if given.
aggregation_key: Only fetch events with this aggregation key, if given.
limit: Only fetch the most recent `limit` events.
direction: Whether to fetch the most recent first (`"b"`) or the
oldest first (`"f"`).
Expand Down Expand Up @@ -122,7 +120,6 @@ async def get_relations(
room_id=room_id,
relation_type=relation_type,
event_type=event_type,
aggregation_key=aggregation_key,
limit=limit,
direction=direction,
from_token=from_token,
Expand Down
6 changes: 0 additions & 6 deletions synapse/storage/databases/main/relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ async def get_relations_for_event(
room_id: str,
relation_type: Optional[str] = None,
event_type: Optional[str] = None,
aggregation_key: Optional[str] = None,
limit: int = 5,
direction: str = "b",
from_token: Optional[StreamToken] = None,
Expand All @@ -76,7 +75,6 @@ async def get_relations_for_event(
room_id: The room the event belongs to.
relation_type: Only fetch events with this relation type, if given.
event_type: Only fetch events with this event type, if given.
aggregation_key: Only fetch events with this aggregation key, if given.
limit: Only fetch the most recent `limit` events.
direction: Whether to fetch the most recent first (`"b"`) or the
oldest first (`"f"`).
Expand Down Expand Up @@ -105,10 +103,6 @@ async def get_relations_for_event(
where_clause.append("type = ?")
where_args.append(event_type)

if aggregation_key:
where_clause.append("aggregation_key = ?")
where_args.append(aggregation_key)

pagination_clause = generate_pagination_where_clause(
direction=direction,
column_names=("topological_ordering", "stream_ordering"),
Expand Down