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

Commit

Permalink
Remove support for the unstable dir flag on relations.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Oct 7, 2022
1 parent 00c93d2 commit a9de33c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
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",
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

0 comments on commit a9de33c

Please sign in to comment.