PronounDB: fix caching not respecting user preference (#1344)

This commit is contained in:
alexia 2023-06-27 22:46:52 +02:00 committed by GitHub
parent 12e3c9234d
commit 8e9ba7c7ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 21 deletions

View file

@ -52,7 +52,7 @@ export default definePlugin({
find: ".userTagNoNickname",
replacement: {
match: /=(\i)\.pronouns/,
replace: "=$self.useProfilePronouns($1.user.id,$1.pronouns)"
replace: "=$self.useProfilePronouns($1.user.id)"
}
},
// Patch the profile modal username header to use our pronoun hook instead of Discord's pronouns
@ -60,7 +60,7 @@ export default definePlugin({
find: ".USER_PROFILE_ACTIVITY",
replacement: {
match: /\).showPronouns/,
replace: ").showPronouns||true;const vcPronounce=$self.useProfilePronouns(arguments[0].user.id,arguments[0].displayProfile?.pronouns);if(arguments[0].displayProfile&&vcPronounce)arguments[0].displayProfile.pronouns=vcPronounce"
replace: ").showPronouns||true;const vcPronounce=$self.useProfilePronouns(arguments[0].user.id);if(arguments[0].displayProfile&&vcPronounce)arguments[0].displayProfile.pronouns=vcPronounce"
}
}
],