From 06f7c8eb2055682fa93f07264823210c036f4454 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Wed, 20 Sep 2023 21:55:51 -0700 Subject: [PATCH] fix: :bug: Add missing references to speakAsCat --- packages/backend/src/remote/activitypub/models/person.ts | 3 ++- packages/backend/test/e2e/users.ts | 4 ++++ packages/client/src/pages/settings/profile.vue | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/remote/activitypub/models/person.ts b/packages/backend/src/remote/activitypub/models/person.ts index c02905fabf..12efe7a780 100644 --- a/packages/backend/src/remote/activitypub/models/person.ts +++ b/packages/backend/src/remote/activitypub/models/person.ts @@ -302,7 +302,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; @@ -549,6 +549,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/test/e2e/users.ts b/packages/backend/test/e2e/users.ts index 1090dc1cb5..86e254aebf 100644 --- a/packages/backend/test/e2e/users.ts +++ b/packages/backend/test/e2e/users.ts @@ -69,6 +69,7 @@ describe("ユーザー", () => { avatarBlurhash: user.avatarBlurhash, isBot: user.isBot, isCat: user.isCat, + speakAsCat: user.speakAsCat, instance: user.instance, emojis: user.emojis, onlineStatus: user.onlineStatus, @@ -401,6 +402,7 @@ describe("ユーザー", () => { assert.strictEqual(response.avatarBlurhash, null); assert.strictEqual(response.isBot, false); assert.strictEqual(response.isCat, false); + assert.strictEqual(response.speakAsCat, false); assert.strictEqual(response.instance, undefined); assert.deepStrictEqual(response.emojis, {}); assert.strictEqual(response.onlineStatus, "unknown"); @@ -538,6 +540,8 @@ describe("ユーザー", () => { { parameters: (): object => ({ isBot: false }) }, { parameters: (): object => ({ isCat: true }) }, { parameters: (): object => ({ isCat: false }) }, + { parameters: (): object => ({ speakAsCat: true }) }, + { parameters: (): object => ({ speakAsCat: false }) }, { parameters: (): object => ({ injectFeaturedNote: true }) }, { parameters: (): object => ({ injectFeaturedNote: false }) }, { parameters: (): object => ({ receiveAnnouncementEmail: true }) }, diff --git a/packages/client/src/pages/settings/profile.vue b/packages/client/src/pages/settings/profile.vue index 7362d86f5f..2e43b1b18b 100644 --- a/packages/client/src/pages/settings/profile.vue +++ b/packages/client/src/pages/settings/profile.vue @@ -141,7 +141,7 @@ }} {{ i18n.ts.flagSpeakAsCat