diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-09-18 16:50:39 +0100 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-09-18 16:50:39 +0100 |
commit | a078de955f34baf8c997c0782b0a1773189fc182 (patch) | |
tree | e0b3c435dc469c96d0634d84aefe71c358043a73 /synapse/config/server.py | |
parent | Add comment (diff) | |
parent | Merge pull request #3879 from matrix-org/matthew/fix-autojoin (diff) | |
download | synapse-matthew/fix_overzealous_ll_state.tar.xz |
Merge branch 'develop' into matthew/fix_overzealous_ll_state github/matthew/fix_overzealous_ll_state matthew/fix_overzealous_ll_state
Diffstat (limited to 'synapse/config/server.py')
-rw-r--r-- | synapse/config/server.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py index 2faf472189..c1c7c0105e 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -404,6 +404,23 @@ class ServerConfig(Config): " service on the given port.") +def is_threepid_reserved(config, threepid): + """Check the threepid against the reserved threepid config + Args: + config(ServerConfig) - to access server config attributes + threepid(dict) - The threepid to test for + + Returns: + boolean Is the threepid undertest reserved_user + """ + + for tp in config.mau_limits_reserved_threepids: + if (threepid['medium'] == tp['medium'] + and threepid['address'] == tp['address']): + return True + return False + + def read_gc_thresholds(thresholds): """Reads the three integer thresholds for garbage collection. Ensures that the thresholds are integers if thresholds are supplied. |