summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/NoteDeleteService.ts
diff options
context:
space:
mode:
authoranatawa12 <anatawa12@icloud.com>2023-10-30 13:48:22 +0900
committerGitHub <noreply@github.com>2023-10-30 13:48:22 +0900
commit7015cc937bd872e9c7ebafb56bdaea4ca138e0df (patch)
tree4cba42621dea7c76c4e8240d649202263710c7ba /packages/backend/src/core/NoteDeleteService.ts
parentenhance(frontend): URL入力フォームのtypeをurlに (diff)
downloadsharkey-7015cc937bd872e9c7ebafb56bdaea4ca138e0df.tar.gz
sharkey-7015cc937bd872e9c7ebafb56bdaea4ca138e0df.tar.bz2
sharkey-7015cc937bd872e9c7ebafb56bdaea4ca138e0df.zip
fix(backend): We can renote pure renote (#12171)
* chore: make pure renote detection an function * fix: we can renote pure renote * docs(changelog): リノートをリノートできるのを修正 * fix: remaining debug log * chore: move isPureRenote to misc * chore: make isPureRenote type guard * chore: use isPureRenote in other places * fix CHANGELOG * style: fix lint --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Diffstat (limited to 'packages/backend/src/core/NoteDeleteService.ts')
-rw-r--r--packages/backend/src/core/NoteDeleteService.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/backend/src/core/NoteDeleteService.ts b/packages/backend/src/core/NoteDeleteService.ts
index 9a817ffd76..632daf991a 100644
--- a/packages/backend/src/core/NoteDeleteService.ts
+++ b/packages/backend/src/core/NoteDeleteService.ts
@@ -24,6 +24,7 @@ import { bindThis } from '@/decorators.js';
import { MetaService } from '@/core/MetaService.js';
import { SearchService } from '@/core/SearchService.js';
import { ModerationLogService } from '@/core/ModerationLogService.js';
+import { isPureRenote } from '@/misc/is-pure-renote.js';
@Injectable()
export class NoteDeleteService {
@@ -77,8 +78,8 @@ export class NoteDeleteService {
if (this.userEntityService.isLocalUser(user) && !note.localOnly) {
let renote: MiNote | null = null;
- // if deletd note is renote
- if (note.renoteId && note.text == null && !note.hasPoll && (note.fileIds == null || note.fileIds.length === 0)) {
+ // if deleted note is renote
+ if (isPureRenote(note)) {
renote = await this.notesRepository.findOneBy({
id: note.renoteId,
});