Closed lowercase-donkey closed 11 months ago
The isSimilarUser
function within the bskyHelpers.ts
file has been updated to refine its user matching logic. The function now uses a regular expression with a negative lookbehind assertion to prevent false matches when the string "pfp " precedes the account name. This change ensures that descriptions containing "pfp " are not incorrectly identified as similar users.
File | Change Summary |
---|---|
.../bskyHelpers.ts |
Updated isSimilarUser function to use regex with negative lookbehind to improve matching criteria in bskyProfile.description . |
🐇 In the code's burrow, beneath the autumn's glow,
Changes hop in, regex flows,
No "pfp " in sight, the match is just right,
As the digital meadow continues to grow. 🍂🌟
This code rabbit thing is wild!
The content of this PR has been corrected in #32 and is closed
"handle name in description" seems to give a lot of false positives for me, and a common reason is this:
Note here that
camalange
is just trying to give credit for their pic tocoughdrops
.This PR attempts to filter out these false positives using a negative lookbehind and regex. (Please test it out in the project, I was only able to test the JS in console!) The regex means that when it hits a possible match, it will check to make sure it doesn't have "pfp " in front of it before matching. Hopefully.
There's a chance you will miss a few account matches due to this, but I hope you find it worth it for the false positives it filters out.
Summary by CodeRabbit