Skip to content

Commit

Permalink
fix: improve filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
sparky-raccoon committed Mar 16, 2024
1 parent 7140473 commit 8aea621
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const initCronJob = async (client: Client) => {
const filters = await FirestoreChannel.getFilters(channelId);
const noFiltersDefined = filters.length === 0;
const someFiltersMatch = filters.some((f) => {
const regex = new RegExp(f, "i");
const regex = new RegExp(`[\\s,;.-_'"]${f}[\\s,;.-_'"]`, "i");
return regex.test(pub.title) || regex.test(pub.contentSnippet);
});

Expand Down

0 comments on commit 8aea621

Please sign in to comment.