fix(backend): isBot not being set on Application type (#12248)

* fix: bot not being set on all relays

* updatePerson missing the change

* chore: replace wrong word with correct word
This commit is contained in:
Marie 2023-11-05 02:22:10 +01:00 committed by GitHub
parent c2ddb649f8
commit 2cce28533f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -269,7 +269,7 @@ export class ApPersonService implements OnModuleInit {
const tags = extractApHashtags(person.tag).map(normalizeForSearch).splice(0, 32); const tags = extractApHashtags(person.tag).map(normalizeForSearch).splice(0, 32);
const isBot = getApType(object) === 'Service'; const isBot = getApType(object) === 'Service' || getApType(object) === 'Application';
const bday = person['vcard:bday']?.match(/^\d{4}-\d{2}-\d{2}/); const bday = person['vcard:bday']?.match(/^\d{4}-\d{2}-\d{2}/);
@ -456,7 +456,7 @@ export class ApPersonService implements OnModuleInit {
emojis: emojiNames, emojis: emojiNames,
name: truncate(person.name, nameLength), name: truncate(person.name, nameLength),
tags, tags,
isBot: getApType(object) === 'Service', isBot: getApType(object) === 'Service' || getApType(object) === 'Application',
isCat: (person as any).isCat === true, isCat: (person as any).isCat === true,
isLocked: person.manuallyApprovesFollowers, isLocked: person.manuallyApprovesFollowers,
movedToUri: person.movedTo ?? null, movedToUri: person.movedTo ?? null,