Lower case for checking don't reply

merge-requests/30/head
Bob Mottram 2022-09-11 19:09:32 +01:00
parent 65496b5a75
commit 2c8a1788cd
1 changed files with 8 additions and 5 deletions

View File

@ -3805,11 +3805,12 @@ def disallow_announce(content: str) -> bool:
"don't boost", "don't boost",
'boost_denied', 'boost_denied',
'boosts_denied', 'boosts_denied',
'BoostDenied', 'boostdenied',
'BoostsDenied' 'boostsdenied'
) )
content_lower = content.lower()
for diss in disallow_strings: for diss in disallow_strings:
if diss in content: if diss in content_lower:
return True return True
return False return False
@ -3828,10 +3829,12 @@ def disallow_reply(content: str) -> bool:
'do not reply', 'do not reply',
"don't reply", "don't reply",
"don't @ me", "don't @ me",
'DontAtMe' 'dont@me',
'dontatme'
) )
content_lower = content.lower()
for diss in disallow_strings: for diss in disallow_strings:
if diss in content: if diss in content_lower:
return True return True
return False return False