set default like

This commit is contained in:
fly_mc 2024-11-15 01:36:26 +08:00
parent 06b3ca962b
commit ddd13186d8
2 changed files with 8 additions and 8 deletions

View file

@ -508,9 +508,9 @@ function like(): void {
if (props.mock) { if (props.mock) {
return; return;
} }
misskeyApi('notes/like', { misskeyApi('notes/reactions/create', {
noteId: appearNote.value.id, noteId: appearNote.value.id,
override: defaultLike.value, reaction: defaultLike.value,
}); });
const el = likeButton.value as HTMLElement | null | undefined; const el = likeButton.value as HTMLElement | null | undefined;
if (el) { if (el) {
@ -533,9 +533,9 @@ function react(): void {
return; return;
} }
misskeyApi('notes/like', { misskeyApi('notes/reactions/create', {
noteId: appearNote.value.id, noteId: appearNote.value.id,
override: defaultLike.value, reaction: defaultLike.value,
}); });
const el = reactButton.value; const el = reactButton.value;
if (el) { if (el) {

View file

@ -500,9 +500,9 @@ function like(): void {
pleaseLogin({ openOnRemote: pleaseLoginContext.value }); pleaseLogin({ openOnRemote: pleaseLoginContext.value });
showMovedDialog(); showMovedDialog();
sound.playMisskeySfx('reaction'); sound.playMisskeySfx('reaction');
misskeyApi('notes/like', { misskeyApi('notes/reactions/create', {
noteId: appearNote.value.id, noteId: appearNote.value.id,
override: defaultLike.value, reaction: defaultLike.value,
}); });
const el = likeButton.value as HTMLElement | null | undefined; const el = likeButton.value as HTMLElement | null | undefined;
if (el) { if (el) {
@ -521,9 +521,9 @@ function react(): void {
if (appearNote.value.reactionAcceptance === 'likeOnly' || disableReactionsViewer.value) { if (appearNote.value.reactionAcceptance === 'likeOnly' || disableReactionsViewer.value) {
sound.playMisskeySfx('reaction'); sound.playMisskeySfx('reaction');
misskeyApi('notes/like', { misskeyApi('notes/reactions/create', {
noteId: appearNote.value.id, noteId: appearNote.value.id,
override: defaultLike.value, reaction: defaultLike.value,
}); });
const el = reactButton.value; const el = reactButton.value;
if (el) { if (el) {