From 704ebcde767ad5d061e3ae2142f72ef0f90110af Mon Sep 17 00:00:00 2001 From: FruitRiin Date: Sat, 16 Dec 2023 13:24:00 +0900 Subject: [PATCH] =?UTF-8?q?=E9=96=8B=E3=81=84=E3=81=A6=E3=82=8B=E3=83=9A?= =?UTF-8?q?=E3=83=BC=E3=82=B8=E3=81=A7=E6=8A=95=E7=A8=BF=E5=85=88=E3=81=8C?= =?UTF-8?q?=E3=83=81=E3=83=A3=E3=83=B3=E3=83=8D=E3=83=AB=E3=81=AB=E3=81=AA?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=81=BB=E3=81=97=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/os.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/packages/frontend/src/os.ts b/packages/frontend/src/os.ts index b02f6aa640..fdcf3eaf30 100644 --- a/packages/frontend/src/os.ts +++ b/packages/frontend/src/os.ts @@ -25,6 +25,7 @@ import MkContextMenu from '@/components/MkContextMenu.vue'; import { MenuItem } from '@/types/menu.js'; import copyToClipboard from '@/scripts/copy-to-clipboard.js'; import { showMovedDialog } from '@/scripts/show-moved-dialog.js'; +import {mainRouter} from "@/router.js"; export const openingWindowsCount = ref(0); @@ -601,6 +602,18 @@ export function post(props: Record = {}): Promise { // Vueが渡されたコンポーネントに内部的に__propsというプロパティを生やす影響で、 // 複数のpost formを開いたときに場合によってはエラーになる // もちろん複数のpost formを開けること自体Misskeyサイドのバグなのだが + + + const route = mainRouter.getCurrentPath().split("/") + if(route[1] === "channels") + props = { + ...props, + // 本当はチャンネル名や色もほしいけどどっからとってこよう + channel: { + id: route[2] + } + } + let dispose; popup(MkPostFormDialog, props, { closed: () => {