Skip to content
Snippets Groups Projects
Unverified Commit 8b6c176a authored by Andrew Morgan's avatar Andrew Morgan Committed by GitHub
Browse files

Add resources.consent conditional dependency back (#8107)

Turns out that part of the codebase (synapse.config.server) checks for this key explicitly. Remove that check.
parent 050e20e7
No related branches found
No related tags found
No related merge requests found
Use the default template file when its equivalent is not found in a custom template directory.
\ No newline at end of file
...@@ -26,7 +26,6 @@ import yaml ...@@ -26,7 +26,6 @@ import yaml
from synapse.api.room_versions import KNOWN_ROOM_VERSIONS from synapse.api.room_versions import KNOWN_ROOM_VERSIONS
from synapse.http.endpoint import parse_and_validate_server_name from synapse.http.endpoint import parse_and_validate_server_name
from synapse.python_dependencies import DependencyException, check_requirements
from ._base import Config, ConfigError from ._base import Config, ConfigError
...@@ -508,8 +507,6 @@ class ServerConfig(Config): ...@@ -508,8 +507,6 @@ class ServerConfig(Config):
) )
) )
_check_resource_config(self.listeners)
self.cleanup_extremities_with_dummy_events = config.get( self.cleanup_extremities_with_dummy_events = config.get(
"cleanup_extremities_with_dummy_events", True "cleanup_extremities_with_dummy_events", True
) )
...@@ -1133,20 +1130,3 @@ def _warn_if_webclient_configured(listeners: Iterable[ListenerConfig]) -> None: ...@@ -1133,20 +1130,3 @@ def _warn_if_webclient_configured(listeners: Iterable[ListenerConfig]) -> None:
if name == "webclient": if name == "webclient":
logger.warning(NO_MORE_WEB_CLIENT_WARNING) logger.warning(NO_MORE_WEB_CLIENT_WARNING)
return return
def _check_resource_config(listeners: Iterable[ListenerConfig]) -> None:
resource_names = {
res_name
for listener in listeners
if listener.http_options
for res in listener.http_options.resources
for res_name in res.names
}
for resource in resource_names:
if resource == "consent":
try:
check_requirements("resources.consent")
except DependencyException as e:
raise ConfigError(e.message)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment