Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly improve spam filtering #55

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-10-09 17:06:05.463730

"""

from alembic import op
import sqlalchemy as sa

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-10-18 11:45:07.370329

"""

from alembic import op
import sqlalchemy as sa
from datetime import datetime
Expand Down
18 changes: 17 additions & 1 deletion docassemble/GithubFeedbackForm/github_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,24 @@ 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 {"leadgeneration.com", "leadmagnet.com"}]):
return True
if any(
[url in body for url in ["boostleadgeneration.com/", "jumboleadmagnet.com/"]]
[
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