mirror of
https://github.com/matrix-org/mjolnir.git
synced 2024-09-29 20:56:23 +00:00
Merge pull request #246 from matrix-org/dmr/fix-check-username-as-spam
Fix block_usernames config option
This commit is contained in:
commit
95d394b964
@ -120,7 +120,9 @@ class AntiSpam(object):
|
|||||||
|
|
||||||
def check_username_for_spam(self, user_profile):
|
def check_username_for_spam(self, user_profile):
|
||||||
if not self.block_usernames:
|
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
|
# Check whether the user ID or display name matches any of the banned
|
||||||
# patterns.
|
# patterns.
|
||||||
|
Loading…
Reference in New Issue
Block a user