diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-05-11 00:17:11 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-05-15 15:11:59 +0100 |
commit | 47815edcfae73c5b938f8354853a09c0b80ef27e (patch) | |
tree | a68e0f4ff14809f5a30b4446c3837aa1eb725957 /synapse/app/homeserver.py | |
parent | Merge remote-tracking branch 'origin/master' into develop (diff) | |
download | synapse-47815edcfae73c5b938f8354853a09c0b80ef27e.tar.xz |
ConsentResource to gather policy consent from users
Hopefully there are enough comments and docs in this that it makes sense on its own.
Diffstat (limited to 'synapse/app/homeserver.py')
-rwxr-xr-x | synapse/app/homeserver.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index a0e465d644..730271628e 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -41,6 +41,7 @@ from synapse.python_dependencies import CONDITIONAL_REQUIREMENTS, \ from synapse.replication.http import ReplicationRestResource, REPLICATION_PREFIX from synapse.replication.tcp.resource import ReplicationStreamProtocolFactory from synapse.rest import ClientRestResource +from synapse.rest.consent.consent_resource import ConsentResource from synapse.rest.key.v1.server_key_resource import LocalKey from synapse.rest.key.v2 import KeyApiV2Resource from synapse.rest.media.v0.content_repository import ContentRepoResource @@ -182,6 +183,14 @@ class SynapseHomeServer(HomeServer): "/_matrix/client/versions": client_resource, }) + if name == "consent": + consent_resource = ConsentResource(self) + if compress: + consent_resource = gz_wrap(consent_resource) + resources.update({ + "/_matrix/consent": consent_resource, + }) + if name == "federation": resources.update({ FEDERATION_PREFIX: TransportLayerServer(self), |