summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts
diff options
context:
space:
mode:
author鴇峰 朔華 <160555157+sakuhanight@users.noreply.github.com>2025-01-08 16:58:29 +0900
committerGitHub <noreply@github.com>2025-01-08 07:58:29 +0000
commit8652ce7cc030cf5d21b86da9cee453dd82667978 (patch)
tree26633fe91165e3980a6d5ea76f775447b7327930 /packages/frontend/src/scripts
parentupdate changelog (#15236) (diff)
downloadsharkey-8652ce7cc030cf5d21b86da9cee453dd82667978.tar.gz
sharkey-8652ce7cc030cf5d21b86da9cee453dd82667978.tar.bz2
sharkey-8652ce7cc030cf5d21b86da9cee453dd82667978.zip
fix(frontend): 自分以外のノートを消したときに実績を解除しないように修正 (#15071)
Diffstat (limited to 'packages/frontend/src/scripts')
-rw-r--r--packages/frontend/src/scripts/get-note-menu.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts
index c1846b0589..e131cf5156 100644
--- a/packages/frontend/src/scripts/get-note-menu.ts
+++ b/packages/frontend/src/scripts/get-note-menu.ts
@@ -5,19 +5,19 @@
import { defineAsyncComponent, Ref, ShallowRef } from 'vue';
import * as Misskey from 'misskey-js';
+import { url } from '@@/js/config.js';
import { claimAchievement } from './achievements.js';
+import type { MenuItem } from '@/types/menu.js';
import { $i } from '@/account.js';
import { i18n } from '@/i18n.js';
import { instance } from '@/instance.js';
import * as os from '@/os.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { copyToClipboard } from '@/scripts/copy-to-clipboard.js';
-import { url } from '@@/js/config.js';
import { defaultStore, noteActions } from '@/store.js';
import { miLocalStorage } from '@/local-storage.js';
import { getUserMenu } from '@/scripts/get-user-menu.js';
import { clipsCache, favoritedChannelsCache } from '@/cache.js';
-import type { MenuItem } from '@/types/menu.js';
import MkRippleEffect from '@/components/MkRippleEffect.vue';
import { isSupportShare } from '@/scripts/navigator.js';
import { getAppearNote } from '@/scripts/get-appear-note.js';
@@ -194,7 +194,7 @@ export function getNoteMenu(props: {
noteId: appearNote.id,
});
- if (Date.now() - new Date(appearNote.createdAt).getTime() < 1000 * 60) {
+ if (Date.now() - new Date(appearNote.createdAt).getTime() < 1000 * 60 && appearNote.userId === $i.id) {
claimAchievement('noteDeletedWithin1min');
}
});
@@ -213,7 +213,7 @@ export function getNoteMenu(props: {
os.post({ initialNote: appearNote, renote: appearNote.renote, reply: appearNote.reply, channel: appearNote.channel });
- if (Date.now() - new Date(appearNote.createdAt).getTime() < 1000 * 60) {
+ if (Date.now() - new Date(appearNote.createdAt).getTime() < 1000 * 60 && appearNote.userId === $i.id) {
claimAchievement('noteDeletedWithin1min');
}
});