Skip to content

Commit

Permalink
Merge pull request #246 from matrix-org/dmr/fix-check-username-as-spam
Browse files Browse the repository at this point in the history
Fix block_usernames config option
  • Loading branch information
DMRobertson authored Mar 21, 2022
2 parents e05616b + 2c9fc0c commit 95d394b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion synapse_antispam/mjolnir/antispam.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ def user_may_invite(self, inviter_user_id, invitee_user_id, room_id):

def check_username_for_spam(self, user_profile):
if not self.block_usernames:
return True # allowed (we aren't blocking based on usernames)
# /!\ NB: unlike other checks, where `True` means allowed,
# here `True` means "this user is a spammer".
return False # allowed (we aren't blocking based on usernames)

# Check whether the user ID or display name matches any of the banned
# patterns.
Expand Down

0 comments on commit 95d394b

Please sign in to comment.