mirror of
https://github.com/ItsVipra/ProToots
synced 2024-11-25 13:00:18 +00:00
make sure partial strings are also matched
This commit is contained in:
parent
2c0dc6be78
commit
8d5e157312
1 changed files with 6 additions and 4 deletions
|
@ -174,11 +174,13 @@ function getPronounField(status, accountName) {
|
|||
|
||||
for (const field of fields) {
|
||||
//match fields against fieldNames
|
||||
if (fieldNames.includes(field.name.toLowerCase())) {
|
||||
debug(`${account.acct}: ${field.value}`);
|
||||
for (const searchTerm of fieldNames) {
|
||||
if (field.name.toLowerCase().includes(searchTerm)) {
|
||||
debug(`${account.acct}: ${field.value}`);
|
||||
|
||||
cachePronouns(accountName, field.value);
|
||||
return field.value;
|
||||
cachePronouns(accountName, field.value);
|
||||
return field.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue