diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-01-19 18:23:45 +0000 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-01-19 18:23:45 +0000 |
commit | 8fe253f19b1c61c38111948cce00a7d260d2925a (patch) | |
tree | a69fe21b4a0e0e907c319226bc04f2fb42cf5c3f | |
parent | trailing commas (diff) | |
download | synapse-8fe253f19b1c61c38111948cce00a7d260d2925a.tar.xz |
fix PR nitpicking
Diffstat (limited to '')
-rw-r--r-- | synapse/util/threepids.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/util/threepids.py b/synapse/util/threepids.py index e921b97796..75efa0117b 100644 --- a/synapse/util/threepids.py +++ b/synapse/util/threepids.py @@ -27,13 +27,16 @@ def check_3pid_allowed(hs, medium, address): medium (str): 3pid medium - e.g. email, msisdn address (str): address within that medium (e.g. "wotan@matrix.org") msisdns need to first have been canonicalised + Returns: + bool: whether the 3PID medium/address is allowed to be added to this HS """ if hs.config.allowed_local_3pids: for constraint in hs.config.allowed_local_3pids: - logger.debug("Checking 3PID %s (%s) against %s (%s)" % ( - address, medium, constraint['pattern'], constraint['medium'] - )) + logger.debug( + "Checking 3PID %s (%s) against %s (%s)", + address, medium, constraint['pattern'], constraint['medium'], + ) if ( medium == constraint['medium'] and re.match(constraint['pattern'], address) |