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

Commit

Permalink
Remove the experimental config flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Apr 11, 2022
1 parent 179af13 commit db8a158
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 28 deletions.
2 changes: 0 additions & 2 deletions synapse/config/experimental.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ class ExperimentalConfig(Config):
def read_config(self, config: JsonDict, **kwargs: Any) -> None:
experimental = config.get("experimental_features") or {}

# MSC3440 (thread relation)
self.msc3440_enabled: bool = experimental.get("msc3440_enabled", False)
# MSC3666: including bundled relations in /search.
self.msc3666_enabled: bool = experimental.get("msc3666_enabled", False)

Expand Down
4 changes: 0 additions & 4 deletions synapse/events/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@

if TYPE_CHECKING:
from synapse.handlers.relations import BundledAggregations
from synapse.server import HomeServer


# Split strings on "." but not "\." This uses a negative lookbehind assertion for '\'
Expand Down Expand Up @@ -396,9 +395,6 @@ class EventClientSerializer:
clients.
"""

def __init__(self, hs: "HomeServer"):
self._msc3440_enabled = hs.config.experimental.msc3440_enabled

def serialize_event(
self,
event: Union[JsonDict, EventBase],
Expand Down
1 change: 0 additions & 1 deletion synapse/rest/client/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def on_GET(self, request: Request) -> Tuple[int, JsonDict]:
# Adds support for jump to date endpoints (/timestamp_to_event) as per MSC3030
"org.matrix.msc3030": self.config.experimental.msc3030_enabled,
# Adds support for thread relations, per MSC3440.
"org.matrix.msc3440": self.config.experimental.msc3440_enabled,
"org.matrix.msc3440.stable": True, # TODO: remove when "v1.3" is added above
},
},
Expand Down
2 changes: 1 addition & 1 deletion synapse/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ def get_oidc_handler(self) -> "OidcHandler":

@cache_in_self
def get_event_client_serializer(self) -> EventClientSerializer:
return EventClientSerializer(self)
return EventClientSerializer()

@cache_in_self
def get_password_policy_handler(self) -> PasswordPolicyHandler:
Expand Down
21 changes: 1 addition & 20 deletions synapse/storage/databases/main/relations.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import logging
from typing import (
TYPE_CHECKING,
Collection,
Dict,
FrozenSet,
Expand All @@ -32,20 +31,12 @@
from synapse.api.constants import RelationTypes
from synapse.events import EventBase
from synapse.storage._base import SQLBaseStore
from synapse.storage.database import (
DatabasePool,
LoggingDatabaseConnection,
LoggingTransaction,
make_in_list_sql_clause,
)
from synapse.storage.database import LoggingTransaction, make_in_list_sql_clause
from synapse.storage.databases.main.stream import generate_pagination_where_clause
from synapse.storage.engines import PostgresEngine
from synapse.types import JsonDict, RoomStreamToken, StreamToken
from synapse.util.caches.descriptors import cached, cachedList

if TYPE_CHECKING:
from synapse.server import HomeServer

logger = logging.getLogger(__name__)


Expand All @@ -63,16 +54,6 @@ class _RelatedEvent:


class RelationsWorkerStore(SQLBaseStore):
def __init__(
self,
database: DatabasePool,
db_conn: LoggingDatabaseConnection,
hs: "HomeServer",
):
super().__init__(database, db_conn, hs)

self._msc3440_enabled = hs.config.experimental.msc3440_enabled

@cached(uncached_args=("event",), tree=True)
async def get_relations_for_event(
self,
Expand Down

0 comments on commit db8a158

Please sign in to comment.