summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/web/ClientServerService.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-01-09 13:26:42 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-01-09 13:26:42 +0900
commit962373cf06f233f7a3c3a5dbe25c558752d8b2d7 (patch)
tree87966e3c1116bed7c248a85b465f4d0f35c5df6d /packages/backend/src/server/web/ClientServerService.ts
parenttweak client (diff)
downloadsharkey-962373cf06f233f7a3c3a5dbe25c558752d8b2d7.tar.gz
sharkey-962373cf06f233f7a3c3a5dbe25c558752d8b2d7.tar.bz2
sharkey-962373cf06f233f7a3c3a5dbe25c558752d8b2d7.zip
fix(server): 非公開のクリップのURLでOGPレンダリングされる問題を修正
Fix #9129
Diffstat (limited to 'packages/backend/src/server/web/ClientServerService.ts')
-rw-r--r--packages/backend/src/server/web/ClientServerService.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts
index c69975fd79..5c29224019 100644
--- a/packages/backend/src/server/web/ClientServerService.ts
+++ b/packages/backend/src/server/web/ClientServerService.ts
@@ -312,7 +312,7 @@ export class ClientServerService {
fastify.get('/opensearch.xml', async (request, reply) => {
const meta = await this.metaService.fetch();
- const name = meta.name || 'Misskey';
+ const name = meta.name ?? 'Misskey';
let content = '';
content += '<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">';
content += `<ShortName>${name}</ShortName>`;
@@ -533,13 +533,12 @@ export class ClientServerService {
});
// Clip
- // TODO: 非publicなclipのハンドリング
fastify.get<{ Params: { clip: string; } }>('/clips/:clip', async (request, reply) => {
const clip = await this.clipsRepository.findOneBy({
id: request.params.clip,
});
- if (clip) {
+ if (clip && clip.isPublic) {
const _clip = await this.clipEntityService.pack(clip);
const profile = await this.userProfilesRepository.findOneByOrFail({ userId: clip.userId });
const meta = await this.metaService.fetch();