From a24e709a06af6cde8b5ba9d7a32d73873a5eeb7d Mon Sep 17 00:00:00 2001 From: okayurisotto Date: Sun, 2 Jul 2023 14:09:53 +0900 Subject: [PATCH] =?UTF-8?q?refactor(`ApNoteService.ts`):=20=E4=B8=8D?= =?UTF-8?q?=E8=A6=81=E3=81=AA=E6=9D=A1=E4=BB=B6=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/activitypub/models/ApNoteService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/activitypub/models/ApNoteService.ts b/packages/backend/src/core/activitypub/models/ApNoteService.ts index 1cdd92655d..3a54aec536 100644 --- a/packages/backend/src/core/activitypub/models/ApNoteService.ts +++ b/packages/backend/src/core/activitypub/models/ApNoteService.ts @@ -345,9 +345,9 @@ export class ApNoteService { const exists = existingEmojis.find(x => x.name === name); if (exists) { - if ((tag.updated != null && exists.updatedAt == null) + if ((exists.updatedAt == null) || (tag.id != null && exists.uri == null) - || (tag.updated != null && exists.updatedAt != null && new Date(tag.updated) > exists.updatedAt) + || (new Date(tag.updated) > exists.updatedAt) || (tag.icon!.url !== exists.originalUrl) ) { await this.emojisRepository.update({