fix(keyword-matcher): fold letter O into digit 0 for numeric trigger keywords - #62
Merged
Merged
Conversation
…keywords
A campaign with a purely numeric keyword like "08" never fired for a
comment spelled "O8" (capital letter O, not the digit zero) — visually
identical on most fonts, and mobile autocapitalize turns a leading "o"
into "O" on top of that. matchKeywords just returned unmatched, the
same result as any genuinely non-matching comment, so nothing surfaced
anywhere until a real commenter reported getting no reply.
Scope the fold to numeric-like keywords only (digits, optionally mixed
with o/O) so a word keyword ("love", "more info") compares exactly
as before — this cannot change matching behavior for any existing
non-numeric campaign.
6 new tests reproduce the production case (O8/o8 matching 08, embedded
in a sentence, matchedKeyword still returns the original keyword, word
keywords unaffected, and no accidental substring match on "108").
Full existing suite still green (144 passed).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
railway-app
Bot
temporarily deployed
to
manychat-alternative / production
September 14, 2026 19:42
Inactive
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebase of #56 onto current
mainto resolve merge conflicts (git rebase, not merge, per request).All commits are authored by @sistemabritto — this PR only replays their original work on top of main after main diverged (Arabic-script normalization in
keyword-matcher.ts, and the Meta→multi-provider migration inlib/instagram/provider.tsthat the attach-next-reel refactor now targets). No content changes beyond conflict resolution.Original PR: #56. The Dockerfile/CI infra originally bundled in #56 is omitted here because it already shipped separately as #33 — the rebase detected it as a duplicate patch and dropped it automatically, so this PR is scoped to just the keyword-matcher fix and the attach-next-reel worker-polling refactor.