summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoranatawa12 <anatawa12@icloud.com>2024-02-17 12:43:39 +0900
committerGitHub <noreply@github.com>2024-02-17 12:43:39 +0900
commitfa243276c5d9acd2c3e49f06170c0187ad3e6dc0 (patch)
tree3d93b958b6d8947d2e081a0453bd34a2d4208ac1
parentMerge pull request from GHSA-qqrm-9grj-6v32 (diff)
downloadmisskey-fa243276c5d9acd2c3e49f06170c0187ad3e6dc0.tar.gz
misskey-fa243276c5d9acd2c3e49f06170c0187ad3e6dc0.tar.bz2
misskey-fa243276c5d9acd2c3e49f06170c0187ad3e6dc0.zip
feat: add link to local note in initial comment of abuse note (#13347)
* feat: add link to local note in initial comment of abuse note * docs(changelog): ノートの通報時にリモートのノートであっても自インスタンスにおけるノートのリンクを含むように
-rw-r--r--CHANGELOG.md1
-rw-r--r--packages/frontend/src/scripts/get-note-menu.ts7
2 files changed, 6 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8a6ff02db6..b6db0b61ef 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -58,6 +58,7 @@
- センシティブなリアクションを認めていないユーザーにセンシティブなカスタム絵文字をリアクションしようとした場合
- ロールが必要な絵文字をリアクションしようとした場合
- Enhance: ページ遷移時にPlayerを閉じるように
+- Enhance: ノートの通報時にリモートのノートであっても自インスタンスにおけるノートのリンクを含むように
- Fix: ネイティブモードの絵文字がモノクロにならないように
- Fix: v2023.12.0で追加された「モデレーターがユーザーのアイコンもしくはバナー画像を未設定状態にできる機能」が管理画面上で正しく表示されていない問題を修正
- Fix: AiScriptの`readline`関数が不正な値を返すことがある問題のv2023.12.0時点での修正がPlay以外に適用されていないのを修正
diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts
index ad46e5dfe7..b273bd36f3 100644
--- a/packages/frontend/src/scripts/get-note-menu.ts
+++ b/packages/frontend/src/scripts/get-note-menu.ts
@@ -102,10 +102,13 @@ export function getAbuseNoteMenu(note: Misskey.entities.Note, text: string): Men
icon: 'ti ti-exclamation-circle',
text,
action: (): void => {
- const u = note.url ?? note.uri ?? `${url}/notes/${note.id}`;
+ const localUrl = `${url}/notes/${note.id}`;
+ let noteInfo = '';
+ if (note.url ?? note.uri != null) noteInfo = `Note: ${note.url ?? note.uri}\n`;
+ noteInfo += `Local Note: ${localUrl}\n`;
os.popup(defineAsyncComponent(() => import('@/components/MkAbuseReportWindow.vue')), {
user: note.user,
- initialComment: `Note: ${u}\n-----\n`,
+ initialComment: `${noteInfo}-----\n`,
}, {}, 'closed');
},
};