summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-03-21 15:31:31 +0000
committerErik Johnston <erik@matrix.org>2019-03-21 15:31:34 +0000
commitf5c944c7f24ebdd6353b64bb8ee339f8a4942a1b (patch)
tree58fb1cfeb27d92d863dce4e90bf7b1959eb0a764
parentUpdate sample config (diff)
downloadsynapse-f5c944c7f24ebdd6353b64bb8ee339f8a4942a1b.tar.xz
Fix comments
-rw-r--r--synapse/events/spamcheck.py4
-rw-r--r--synapse/rulecheck/domain_rule_checker.py4
2 files changed, 5 insertions, 3 deletions
diff --git a/synapse/events/spamcheck.py b/synapse/events/spamcheck.py
index 107c2e1f35..92aaa05e79 100644
--- a/synapse/events/spamcheck.py
+++ b/synapse/events/spamcheck.py
@@ -57,8 +57,8 @@ class SpamChecker(object):
             invitee_userid (str|None): The user ID of the invitee. Is None
                 if this is a third party invite and the 3PID is not bound to a
                 user ID.
-            invitee_userid (dict|None): If a third party invite then is a dict
-                containing the medium and address of the invitee.
+            third_party_invite (dict|None): If a third party invite then is a
+                dict containing the medium and address of the invitee.
             room_id (str)
             new_room (bool): Wether the user is being invited to the room as
                 part of a room creation, if so the invitee would have been
diff --git a/synapse/rulecheck/domain_rule_checker.py b/synapse/rulecheck/domain_rule_checker.py
index b379bbc5b4..bcec465ef4 100644
--- a/synapse/rulecheck/domain_rule_checker.py
+++ b/synapse/rulecheck/domain_rule_checker.py
@@ -84,7 +84,9 @@ class DomainRuleChecker(object):
         if not self.can_invite_by_third_party_id and third_party_invite:
             return False
 
-        if third_party_invite and not invitee_userid:
+        # This is a third party invite (without a bound mxid), so unless we have
+        # banned all third party invites (above) we allow it.
+        if not invitee_userid:
             return True
 
         inviter_domain = self._get_domain_from_id(inviter_userid)