summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2016-08-30 16:21:16 +0100
committerKegan Dougal <kegan@matrix.org>2016-08-30 16:21:16 +0100
commite82247f990d8b47fc1d151d6151d82f9d802bebb (patch)
tree7e3081709e86041bde0a1471690171dbb0f78619 /synapse/config
parentMerge pull request #1055 from matrix-org/erikj/occaisonally_persist (diff)
downloadsynapse-e82247f990d8b47fc1d151d6151d82f9d802bebb.tar.xz
Allow application services to have an optional 'url'
If 'url' is not specified, they will not be pushed for events or queries. This
is useful for bots who simply wish to reserve large chunks of user/alias
namespace, and don't care about being pushed for events.
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/appservice.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/config/appservice.py b/synapse/config/appservice.py
index dfe43b0b4c..3488a28ff2 100644
--- a/synapse/config/appservice.py
+++ b/synapse/config/appservice.py
@@ -132,6 +132,12 @@ def _load_appservice(hostname, as_info, config_filename):
         for p in protocols:
             if not isinstance(p, str):
                 raise KeyError("Bad value for 'protocols' item")
+
+    if as_info["url"] == "":
+        logger.info(
+            "(%s) Explicitly empty 'url' provided. This application service will not receive events or queries.",
+            config_filename,
+        )
     return ApplicationService(
         token=as_info["as_token"],
         url=as_info["url"],