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

View file

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