Skip to content

Commit 1232d54

Browse files
Slightly improve spam filtering
1 parent b8ade2b commit 1232d54

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

docassemble/GithubFeedbackForm/github_issue.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,21 @@ def feedback_link(
120120
def is_likely_spam(body: Optional[str]) -> bool:
121121
if not body:
122122
return False
123+
body = body.lower()
123124
if any(
124-
[url in body for url in ["boostleadgeneration.com/", "jumboleadmagnet.com/"]]
125+
[url in body for url in {"leadgeneration.com", "leadmagnet.com"}]
126+
):
127+
return True
128+
if any(
129+
[keyword
130+
in body
131+
for keyword in
132+
{"free trial", "unsubscribe", "web visitors into leads",
133+
"international long distance calling", "100 times more effective",
134+
"web visitors", "lead feature", "web lead", "lead generation"
135+
}
136+
]
137+
125138
):
126139
return True
127140
return False

0 commit comments

Comments
 (0)