diff --git a/packages/backend/src/core/activitypub/ApInboxService.ts b/packages/backend/src/core/activitypub/ApInboxService.ts index b68f2e394954..c4a62a8ec98d 100644 --- a/packages/backend/src/core/activitypub/ApInboxService.ts +++ b/packages/backend/src/core/activitypub/ApInboxService.ts @@ -351,6 +351,11 @@ export class ApInboxService { return 'skip: malformed createdAt'; } + if (createdAt) { + const delay = Date.now() - createdAt.getTime(); + this.logger.info(`Note Received delay: ${delay}ms, host: ${actor.host}`); + } + await this.noteCreateService.create(actor, { createdAt, renote, diff --git a/packages/backend/src/core/activitypub/models/ApNoteService.ts b/packages/backend/src/core/activitypub/models/ApNoteService.ts index 427babea6011..b337c9924c08 100644 --- a/packages/backend/src/core/activitypub/models/ApNoteService.ts +++ b/packages/backend/src/core/activitypub/models/ApNoteService.ts @@ -316,6 +316,12 @@ export class ApNoteService { const apEmojis = emojis.map(emoji => emoji.name); + const createdAt = note.published ? new Date(note.published) : null; + if (createdAt) { + const delay = Date.now() - createdAt.getTime(); + this.logger.info(`Note Received delay: ${delay}ms, host: ${actor.host}`); + } + try { return await this.noteCreateService.create(actor, { createdAt: note.published ? new Date(note.published) : null,