diff --git a/packages/backend/src/server/api/endpoints/meta.ts b/packages/backend/src/server/api/endpoints/meta.ts index 64f25e2ba0..2f409eb190 100644 --- a/packages/backend/src/server/api/endpoints/meta.ts +++ b/packages/backend/src/server/api/endpoints/meta.ts @@ -523,10 +523,9 @@ export default define(meta, paramDef, async (ps, me) => { github: instance.enableGithubIntegration, discord: instance.enableDiscordIntegration, serviceWorker: instance.enableServiceWorker, + postEditing: instance.experimentalFeatures?.postEditing || false, miauth: true, }; - - response.experimentalFeatures = instance.experimentalFeatures; } return response; diff --git a/packages/calckey-js/src/entities.ts b/packages/calckey-js/src/entities.ts index 7ecfba649b..5a581a54cd 100644 --- a/packages/calckey-js/src/entities.ts +++ b/packages/calckey-js/src/entities.ts @@ -304,7 +304,6 @@ export type LiteInstanceMetadata = { url: string; imageUrl: string; }[]; - experimentalFeatures?: Record; }; export type DetailedInstanceMetadata = LiteInstanceMetadata & { diff --git a/packages/client/src/instance.ts b/packages/client/src/instance.ts index ad83528e1b..3381684a03 100644 --- a/packages/client/src/instance.ts +++ b/packages/client/src/instance.ts @@ -8,7 +8,7 @@ const instanceData = localStorage.getItem("instance"); // TODO: instanceをリアクティブにするかは再考の余地あり -export const instance: Misskey.entities.InstanceMetadata = reactive( +export const instance: Misskey.entities.DetailedInstanceMetadata = reactive( instanceData ? JSON.parse(instanceData) : { @@ -18,7 +18,7 @@ export const instance: Misskey.entities.InstanceMetadata = reactive( export async function fetchInstance() { const meta = await api("meta", { - detail: false, + detail: true, }); for (const [k, v] of Object.entries(meta)) { diff --git a/packages/client/src/scripts/get-note-menu.ts b/packages/client/src/scripts/get-note-menu.ts index 72147c1c63..1ec36d1ef4 100644 --- a/packages/client/src/scripts/get-note-menu.ts +++ b/packages/client/src/scripts/get-note-menu.ts @@ -421,7 +421,7 @@ export function getNoteMenu(props: { null, - instance.experimentalFeatures?.postEditing && isAppearAuthor + instance.features.postEditing && isAppearAuthor ? { icon: "ph-pencil-line ph-bold ph-lg", text: i18n.ts.edit, @@ -430,7 +430,7 @@ export function getNoteMenu(props: { } : undefined, - instance.experimentalFeatures?.postEditing + instance.features.postEditing ? { icon: "ph-copy ph-bold ph-lg", text: i18n.ts.duplicate,