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

Remove support for the unstable dir flag on relations. #14106

Merged
merged 4 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 0 additions & 3 deletions synapse/config/experimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ def read_config(self, config: JsonDict, **kwargs: Any) -> None:
# MSC3773: Thread notifications
self.msc3773_enabled: bool = experimental.get("msc3773_enabled", False)

# MSC3715: dir param on /relations.
self.msc3715_enabled: bool = experimental.get("msc3715_enabled", False)

# MSC3848: Introduce errcodes for specific event sending failures
self.msc3848_enabled: bool = experimental.get("msc3848_enabled", False)

Expand Down
13 changes: 1 addition & 12 deletions synapse/rest/client/relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def __init__(self, hs: "HomeServer"):
self.auth = hs.get_auth()
self.store = hs.get_datastores().main
self._relations_handler = hs.get_relations_handler()
self._msc3715_enabled = hs.config.experimental.msc3715_enabled

async def on_GET(
self,
Expand All @@ -60,17 +59,7 @@ async def on_GET(
#
# TODO Use PaginationConfig.from_request when the unstable parameter is
# no longer needed.
direction = parse_string(request, "dir", allowed_values=["f", "b"])
if direction is None:
if self._msc3715_enabled:
direction = parse_string(
request,
"org.matrix.msc3715.dir",
DMRobertson marked this conversation as resolved.
Show resolved Hide resolved
default="b",
allowed_values=["f", "b"],
)
else:
direction = "b"
direction = parse_string(request, "dir", default="b", allowed_values=["f", "b"])
from_token_str = parse_string(request, "from")
to_token_str = parse_string(request, "to")

Expand Down