URLプレビューのサムネイルを隠す機能を追加 (MisskeyIO#214)

This commit is contained in:
CyberRex
2023-11-07 02:31:26 +09:00
committed by GitHub
parent f229e26312
commit ec5e1df9f5
11 changed files with 76 additions and 1 deletions

View File

@@ -298,6 +298,14 @@ export const meta = {
type: 'number',
optional: false, nullable: false,
},
urlPreviewDenyList: {
type: 'array',
optional: true, nullable: false,
items: {
type: 'string',
optional: false, nullable: false,
},
},
},
},
} as const;
@@ -404,6 +412,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
perRemoteUserUserTimelineCacheMax: instance.perRemoteUserUserTimelineCacheMax,
perUserHomeTimelineCacheMax: instance.perUserHomeTimelineCacheMax,
perUserListTimelineCacheMax: instance.perUserListTimelineCacheMax,
urlPreviewDenyList: instance.urlPreviewDenyList,
};
});
}

View File

@@ -110,6 +110,9 @@ export const paramDef = {
perRemoteUserUserTimelineCacheMax: { type: 'integer' },
perUserHomeTimelineCacheMax: { type: 'integer' },
perUserListTimelineCacheMax: { type: 'integer' },
urlPreviewDenyList: { type: 'array', nullable: true, items: {
type: 'string',
} },
},
required: [],
} as const;
@@ -147,6 +150,10 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
set.sensitiveWords = ps.sensitiveWords.filter(Boolean);
}
if (Array.isArray(ps.urlPreviewDenyList)) {
set.urlPreviewDenyList = ps.urlPreviewDenyList.filter(Boolean);
}
if (ps.themeColor !== undefined) {
set.themeColor = ps.themeColor;
}