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

Commit

Permalink
Merge commit '8b6c176ae' into anoa/dinsic_release_1_21_x
Browse files Browse the repository at this point in the history
* commit '8b6c176ae':
  Add resources.consent conditional dependency back (#8107)
  • Loading branch information
anoadragon453 committed Oct 19, 2020
2 parents 25b077d + 8b6c176 commit bbc77d3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
1 change: 1 addition & 0 deletions changelog.d/8107.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Use the default template file when its equivalent is not found in a custom template directory.
20 changes: 0 additions & 20 deletions synapse/config/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

from synapse.api.room_versions import KNOWN_ROOM_VERSIONS
from synapse.http.endpoint import parse_and_validate_server_name
from synapse.python_dependencies import DependencyException, check_requirements

from ._base import Config, ConfigError

Expand Down Expand Up @@ -514,8 +513,6 @@ class LimitRemoteRoomsConfig(object):
)
)

_check_resource_config(self.listeners)

self.cleanup_extremities_with_dummy_events = config.get(
"cleanup_extremities_with_dummy_events", True
)
Expand Down Expand Up @@ -1238,20 +1235,3 @@ def _warn_if_webclient_configured(listeners: Iterable[ListenerConfig]) -> None:
if name == "webclient":
logger.warning(NO_MORE_WEB_CLIENT_WARNING)
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 comments on commit bbc77d3

Please sign in to comment.