diff options
| author | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-03-06 16:28:25 +0900 |
|---|---|---|
| committer | syuilo <4439005+syuilo@users.noreply.github.com> | 2025-03-06 16:28:25 +0900 |
| commit | 896bde100508c9122c6915567fe398dfb1914c94 (patch) | |
| tree | b0749661a61a2ff004f142b120cfbfae170246a4 /packages/frontend/src/scripts | |
| parent | fix(frontend): tabler-iconsが読み込めない問題を修正(正式リ... (diff) | |
| download | misskey-896bde100508c9122c6915567fe398dfb1914c94.tar.gz misskey-896bde100508c9122c6915567fe398dfb1914c94.tar.bz2 misskey-896bde100508c9122c6915567fe398dfb1914c94.zip | |
revert https://github.com/misskey-dev/misskey/pull/15545
see https://github.com/misskey-dev/misskey/issues/14498
Diffstat (limited to 'packages/frontend/src/scripts')
| -rw-r--r-- | packages/frontend/src/scripts/get-note-menu.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/packages/frontend/src/scripts/get-note-menu.ts b/packages/frontend/src/scripts/get-note-menu.ts index de7ed15675..84122c0e60 100644 --- a/packages/frontend/src/scripts/get-note-menu.ts +++ b/packages/frontend/src/scripts/get-note-menu.ts @@ -4,10 +4,10 @@ */ import { defineAsyncComponent } from 'vue'; +import type { Ref, ShallowRef } from 'vue'; import * as Misskey from 'misskey-js'; import { url } from '@@/js/config.js'; import { claimAchievement } from './achievements.js'; -import type { Ref, ShallowRef } from 'vue'; import type { MenuItem } from '@/types/menu.js'; import { $i } from '@/account.js'; import { i18n } from '@/i18n.js'; @@ -208,7 +208,15 @@ export function getNoteMenu(props: { }).then(({ canceled }) => { if (canceled) return; - os.post({ initialNote: appearNote, renote: appearNote.renote, reply: appearNote.reply, channel: appearNote.channel, deleteInitialNoteAfterPost: true }); + misskeyApi('notes/delete', { + noteId: appearNote.id, + }); + + os.post({ initialNote: appearNote, renote: appearNote.renote, reply: appearNote.reply, channel: appearNote.channel }); + + if (Date.now() - new Date(appearNote.createdAt).getTime() < 1000 * 60 && appearNote.userId === $i.id) { + claimAchievement('noteDeletedWithin1min'); + } }); } |