1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-24 13:54:12 +02:00
This commit is contained in:
syuilo
2025-09-01 10:19:14 +09:00
parent bdec4bf87a
commit 08ecf7ca79
2 changed files with 4 additions and 3 deletions

View File

@@ -138,9 +138,10 @@ async function addPinnedNote() {
const { canceled, result: value } = await os.inputText({
title: i18n.ts.noteIdOrUrl,
});
if (canceled) return;
if (canceled || value == null) return;
const fromUrl = value.includes('/') ? value.split('/').pop() : null;
const note = await os.apiWithDialog('notes/show', {
noteId: value.includes('/') ? value.split('/').pop() : value,
noteId: fromUrl ?? value,
});
pinnedNotes.value = [{
id: note.id,