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

Feature filter keywords 3710 #5263

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

leoseg
Copy link
Contributor

@leoseg leoseg commented Dec 14, 2024

Option to block keyswords so no post containing this keywords in their name, body or url are returned, keywords are stored in seperate table related to person

@aeharding
Copy link

What happens if you block "X"? Will it match "Xylophone"? What about "x.com"?

Unlike person and community blocks this seems a bit more ambiguous.

@leoseg
Copy link
Contributor Author

leoseg commented Dec 16, 2024

In the moment yes, because the ilike searches for case insensitive substrings.
A possibility could be to block only posts and descriptions which containing the blocked keyword as one word of his own (without being part of another word) , or urls having the keyword as parameter, or identifier without prefixes and suffices. For example for www.mcdonalds.com and the 'mcdonalds' part should be equal the blocked keyword if it should be filtered.

@Nutomic
Copy link
Member

Nutomic commented Dec 17, 2024

You could also consider a minimum length of eg 3 characters for each blocked string.

And you need to make sure that the checks are passing (click the details link at the bottom of this page). See .woodpecker.yml in the repo for the commands it runs, so you can check and fix them locally.

@leoseg
Copy link
Contributor Author

leoseg commented Dec 19, 2024

yes this sounds more simple and in the Connect Lenny app they do it like this. I will add the restriction, fix checks add unit tests when I have time at the beginning of the next year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants