From d423d9bb445962ef06c96e4d74a7e2d6385ba822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=82=E3=82=8F=E3=82=8F=E3=82=8F=E3=81=A8=E3=83=BC?= =?UTF-8?q?=E3=81=AB=E3=82=85?= <17376330+u1-liquid@users.noreply.github.com> Date: Fri, 17 Jan 2025 20:47:10 +0900 Subject: [PATCH] =?UTF-8?q?fix(MisskeyIO#907):=20=E3=82=B5=E3=83=96?= =?UTF-8?q?=E3=82=B9=E3=82=AF=E3=83=A9=E3=82=A4=E3=83=96=E3=82=B3=E3=83=9E?= =?UTF-8?q?=E3=83=B3=E3=83=89=E3=81=AF=E5=BF=85=E8=A6=81=E3=81=A0=E3=81=A3?= =?UTF-8?q?=E3=81=9F=20(MisskeyIO#910)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/scripts/use-note-capture.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/scripts/use-note-capture.ts b/packages/frontend/src/scripts/use-note-capture.ts index db21dcba199d..3511e7a93377 100644 --- a/packages/frontend/src/scripts/use-note-capture.ts +++ b/packages/frontend/src/scripts/use-note-capture.ts @@ -86,9 +86,14 @@ export function useNoteCapture(props: { function capture(withHandler = false): void { if (connection) { + let command: string; if ($i && (note.value?.visibleUserIds?.includes($i.id) ?? note.value?.mentions?.includes($i.id))) { - connection.send(document.body.contains(props.rootEl.value ?? null as Node | null) ? 'sr' : 's', { id: note.value.id }); + command = document.body.contains(props.rootEl.value ?? null as Node | null) ? 'sr' : 's'; + } else { + command = 's'; } + + connection.send(command, { id: note.value.id }); if (pureNote.value.id !== note.value.id) connection.send('s', { id: pureNote.value.id }); if (withHandler) connection.on('noteUpdated', onStreamNoteUpdated); }