Skip to content
Snippets Groups Projects
Commit 7aba8464 authored by Marie's avatar Marie
Browse files

merge: silence linter (!785)

View MR for information: !785



Approved-by: default avatarMarie <github@yuugi.dev>
Approved-by: default avatarHazelnoot <acomputerdog@gmail.com>
parents 3164e7b4 9309872c
No related branches found
No related tags found
1 merge request!785silence linter
Pipeline #1954 passed with stages
in 19 minutes
......@@ -588,12 +588,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
// `ApRendererService.renderPerson`
private userNeedsPublishing(oldUser: MiLocalUser, newUser: Partial<MiUser>): boolean {
for (const field of ['avatarId', 'bannerId', 'backgroundId', 'isBot', 'username', 'name', 'isLocked', 'isExplorable', 'isCat', 'noindex', 'speakAsCat', 'movedToUri', 'alsoKnownAs'] as (keyof MiUser)[]) {
if (newUser.hasOwnProperty(field) && oldUser[field] !== newUser[field]) {
if ((field in newUser) && oldUser[field] !== newUser[field]) {
return true;
}
}
for (const arrayField of ['emojis', 'tags'] as (keyof MiUser)[]) {
if (newUser.hasOwnProperty(arrayField) !== oldUser.hasOwnProperty(arrayField)) {
if ((arrayField in newUser) !== (arrayField in oldUser)) {
return true;
}
......@@ -611,12 +611,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private profileNeedsPublishing(oldProfile: MiUserProfile, newProfile: Partial<MiUserProfile>): boolean {
for (const field of ['description', 'followedMessage', 'birthday', 'location', 'listenbrainz'] as (keyof MiUserProfile)[]) {
if (newProfile.hasOwnProperty(field) && oldProfile[field] !== newProfile[field]) {
if ((field in newProfile) && oldProfile[field] !== newProfile[field]) {
return true;
}
}
for (const arrayField of ['fields'] as (keyof MiUserProfile)[]) {
if (newProfile.hasOwnProperty(arrayField) !== oldProfile.hasOwnProperty(arrayField)) {
if ((arrayField in newProfile) !== (arrayField in oldProfile)) {
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment