From 6a46044cf45f7c9144ab5347737cb5a57455e5bb Mon Sep 17 00:00:00 2001 From: naskya Date: Sat, 23 Sep 2023 13:36:35 +0900 Subject: [PATCH] fix: non-Firefish cats not being nyanified --- .../backend/src/remote/activitypub/models/person.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/remote/activitypub/models/person.ts b/packages/backend/src/remote/activitypub/models/person.ts index c663cdd9..28498bc6 100644 --- a/packages/backend/src/remote/activitypub/models/person.ts +++ b/packages/backend/src/remote/activitypub/models/person.ts @@ -301,7 +301,10 @@ export async function createPerson( tags, isBot, isCat: (person as any).isCat === true, - speakAsCat: (person as any).speakAsCat === true, + speakAsCat: + person.speakAsCat != null + ? person.speakAsCat === true + : (person as any).isCat === true, isIndexable: person.indexable, }), )) as IRemoteUser; @@ -545,7 +548,10 @@ export async function updatePerson( tags, isBot: getApType(object) !== "Person", isCat: (person as any).isCat === true, - speakAsCat: (person as any).speakAsCat === true, + speakAsCat: + person.speakAsCat != null + ? person.speakAsCat === true + : (person as any).isCat === true, isIndexable: person.indexable, isLocked: !!person.manuallyApprovesFollowers, movedToUri: person.movedTo || null,