summary refs log tree commit diff
path: root/synapse/config/appservice.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-11-01 13:14:04 +0000
committerErik Johnston <erik@matrix.org>2016-11-01 13:14:04 +0000
commit4a9055d4465d5d6059612e7c89f2b5774efc0e18 (patch)
treef5d146248431ce35f1ad810267024af4eb907bdf /synapse/config/appservice.py
parentMerge branch 'release-v0.18.1' of github.com:matrix-org/synapse (diff)
parentBump version and changelog (diff)
downloadsynapse-4a9055d4465d5d6059612e7c89f2b5774efc0e18.tar.xz
Merge branch 'release-v0.18.2' of github.com:matrix-org/synapse v0.18.2
Diffstat (limited to 'synapse/config/appservice.py')
-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 d7537e8d44..82c50b8240 100644
--- a/synapse/config/appservice.py
+++ b/synapse/config/appservice.py
@@ -110,6 +110,11 @@ def _load_appservice(hostname, as_info, config_filename):
     user = UserID(localpart, hostname)
     user_id = user.to_string()
 
+    # Rate limiting for users of this AS is on by default (excludes sender)
+    rate_limited = True
+    if isinstance(as_info.get("rate_limited"), bool):
+        rate_limited = as_info.get("rate_limited")
+
     # namespace checks
     if not isinstance(as_info.get("namespaces"), dict):
         raise KeyError("Requires 'namespaces' object.")
@@ -155,4 +160,5 @@ def _load_appservice(hostname, as_info, config_filename):
         sender=user_id,
         id=as_info["id"],
         protocols=protocols,
+        rate_limited=rate_limited
     )