Skip to content
Snippets Groups Projects
Commit 8fe253f1 authored by Matthew Hodgson's avatar Matthew Hodgson
Browse files

fix PR nitpicking

parent 293380be
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment