Merge upstream 2025-01-17 #40

Merged
ashten merged 35 commits from sugar/forkey:merge-upstream-2025-01-17 into main 2025-02-03 16:05:49 +00:00
Showing only changes of commit d423d9bb44 - Show all commits

View file

@ -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);
}