Skip to content

Commit

Permalink
Slightly improve spam filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
nonprofittechy committed Jul 22, 2024
1 parent b8ade2b commit 1232d54
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion docassemble/GithubFeedbackForm/github_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,21 @@ def feedback_link(
def is_likely_spam(body: Optional[str]) -> bool:
if not body:
return False
body = body.lower()
if any(
[url in body for url in ["boostleadgeneration.com/", "jumboleadmagnet.com/"]]
[url in body for url in {"leadgeneration.com", "leadmagnet.com"}]
):
return True
if any(
[keyword
in body
for keyword in
{"free trial", "unsubscribe", "web visitors into leads",
"international long distance calling", "100 times more effective",
"web visitors", "lead feature", "web lead", "lead generation"
}
]

):
return True
return False
Expand Down

0 comments on commit 1232d54

Please sign in to comment.