Merge pull request #32 from lowercase-donkey/universal-pfp-check

Alternate to #31
This commit is contained in:
ryo 2023-11-21 17:19:08 +09:00 committed by GitHub
commit aef940f488
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,7 +39,7 @@ export const isSimilarUser = (names: Names, bskyProfile: ProfileView | undefined
}
}
if (bskyProfile.description?.toLocaleLowerCase().includes(`@${lowerCaseNames.accountName}`)) {
if (bskyProfile.description?.toLocaleLowerCase().includes(`@${lowerCaseNames.accountName}`) && !['pfp ', 'pfp: ', 'pfp by '].some(t => bskyProfile.description.toLocaleLowerCase().includes(`${t}@${lowerCaseNames.accountName}`))) {
return {
isSimilar: true,
type: BSKY_USER_MATCH_TYPE.DESCRIPTION,