From c9819babfefb9c97fa56c33439f0d29351462e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Tue, 24 Sep 2024 19:27:20 +0900 Subject: [PATCH] =?UTF-8?q?fix(frontend-embed):=20#14613=20=E3=81=A7?= =?UTF-8?q?=E6=8A=9C=E3=81=91=E8=90=BD=E3=81=A1=E3=81=9F=E5=87=A6=E7=90=86?= =?UTF-8?q?=E3=82=92=E6=88=BB=E3=81=99=20(#14623)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend-embed/src/pages/note.vue | 9 ++++++++- packages/frontend-embed/src/utils.ts | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/frontend-embed/src/pages/note.vue b/packages/frontend-embed/src/pages/note.vue index 918583ecc..6f6c8c0f6 100644 --- a/packages/frontend-embed/src/pages/note.vue +++ b/packages/frontend-embed/src/pages/note.vue @@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only @@ -27,6 +27,8 @@ const serverContext = inject(DI.serverContext)!; const note = ref(null); +const prohibited = ref(false); + if (assertServerContext(serverContext, 'note')) { note.value = serverContext.note; } else { @@ -36,6 +38,11 @@ if (assertServerContext(serverContext, 'note')) { return null; }); } + +if (note.value?.url != null || note.value?.uri != null) { + // リモートサーバーのノートは弾く + prohibited.value = true; +}