Skip to content

Commit

Permalink
fix(#907): サブスクライブコマンドは必要だった (#910)
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid authored Jan 17, 2025
1 parent 428ff56 commit d423d9b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/frontend/src/scripts/use-note-capture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d423d9b

Please sign in to comment.