From eec4a5082d3adf0164c4d320ac444c35bc43e381 Mon Sep 17 00:00:00 2001 From: Hazel K Date: Sun, 6 Oct 2024 11:03:28 -0400 Subject: [PATCH] fix OpenAPI definition for admin/meta.silencedHosts --- packages/backend/src/server/api/endpoints/admin/meta.ts | 2 +- packages/frontend/src/pages/instance-info.vue | 4 ++-- packages/misskey-js/src/autogen/types.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/admin/meta.ts b/packages/backend/src/server/api/endpoints/admin/meta.ts index 5a69fbf679..dbfa31024a 100644 --- a/packages/backend/src/server/api/endpoints/admin/meta.ts +++ b/packages/backend/src/server/api/endpoints/admin/meta.ts @@ -128,7 +128,7 @@ export const meta = { }, silencedHosts: { type: 'array', - optional: true, + optional: false, nullable: false, items: { type: 'string', diff --git a/packages/frontend/src/pages/instance-info.vue b/packages/frontend/src/pages/instance-info.vue index 929c22d114..821cd599eb 100644 --- a/packages/frontend/src/pages/instance-info.vue +++ b/packages/frontend/src/pages/instance-info.vue @@ -190,8 +190,8 @@ const baseDomains = computed(() => { return domains; }); const isBaseBlocked = computed(() => meta.value && baseDomains.value.some(d => meta.value?.blockedHosts.includes(d))); -const isBaseSilenced = computed(() => meta.value && meta.value.silencedHosts && baseDomains.value.some(d => meta.value?.silencedHosts?.includes(d))); -const isBaseMediaSilenced = computed(() => meta.value && meta.value.mediaSilencedHosts && baseDomains.value.some(d => meta.value?.mediaSilencedHosts.includes(d))); +const isBaseSilenced = computed(() => meta.value && baseDomains.value.some(d => meta.value?.silencedHosts.includes(d))); +const isBaseMediaSilenced = computed(() => meta.value && baseDomains.value.some(d => meta.value?.mediaSilencedHosts.includes(d))); const usersPagination = { endpoint: iAmModerator ? 'admin/show-users' : 'users' as const, diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 0e83bdfcca..e3bf828982 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -5199,7 +5199,7 @@ export type operations = { enableEmail: boolean; enableServiceWorker: boolean; translatorAvailable: boolean; - silencedHosts?: string[]; + silencedHosts: string[]; mediaSilencedHosts: string[]; pinnedUsers: string[]; hiddenTags: string[];