Fix comments

This commit is contained in:
Erik Johnston 2019-03-21 15:31:31 +00:00
parent aefb7a1146
commit f5c944c7f2
2 changed files with 5 additions and 3 deletions

View file

@ -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

View file

@ -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)