From 33466420baac2f156940dce76f31eae4ec2a6bf4 Mon Sep 17 00:00:00 2001 From: naskya Date: Thu, 21 Sep 2023 16:58:24 +0900 Subject: [PATCH] fix: federate `speakAsCat` --- packages/backend/src/remote/activitypub/models/person.ts | 3 ++- packages/backend/src/remote/activitypub/renderer/index.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/remote/activitypub/models/person.ts b/packages/backend/src/remote/activitypub/models/person.ts index c15e33db..c663cdd9 100644 --- a/packages/backend/src/remote/activitypub/models/person.ts +++ b/packages/backend/src/remote/activitypub/models/person.ts @@ -301,7 +301,7 @@ export async function createPerson( tags, isBot, isCat: (person as any).isCat === true, - speakAsCat: person.speakAsCat, + speakAsCat: (person as any).speakAsCat === true, isIndexable: person.indexable, }), )) as IRemoteUser; @@ -545,6 +545,7 @@ export async function updatePerson( tags, isBot: getApType(object) !== "Person", isCat: (person as any).isCat === true, + speakAsCat: (person as any).speakAsCat === true, isIndexable: person.indexable, isLocked: !!person.manuallyApprovesFollowers, movedToUri: person.movedTo || null, diff --git a/packages/backend/src/remote/activitypub/renderer/index.ts b/packages/backend/src/remote/activitypub/renderer/index.ts index bb5dcdfc..dc8e1325 100644 --- a/packages/backend/src/remote/activitypub/renderer/index.ts +++ b/packages/backend/src/remote/activitypub/renderer/index.ts @@ -35,6 +35,9 @@ export const renderActivity = (x: any): IActivity | null => { schema: "http://schema.org#", PropertyValue: "schema:PropertyValue", value: "schema:value", + // Firefish + firefish: "https://joinfirefish.org/ns#", + speakAsCat: "firefish:speakAsCat", // Misskey misskey: "https://misskey-hub.net/ns#", _misskey_content: "misskey:_misskey_content",