Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
8fe253f1
Commit
8fe253f1
authored
7 years ago
by
Matthew Hodgson
Browse files
Options
Downloads
Patches
Plain Diff
fix PR nitpicking
parent
293380be
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/util/threepids.py
+6
-3
6 additions, 3 deletions
synapse/util/threepids.py
with
6 additions
and
3 deletions
synapse/util/threepids.py
+
6
−
3
View file @
8fe253f1
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment