diff --git a/packages/backend/src/queue/processors/InboxProcessorService.ts b/packages/backend/src/queue/processors/InboxProcessorService.ts index 931d4a412f..8bc981e10a 100644 --- a/packages/backend/src/queue/processors/InboxProcessorService.ts +++ b/packages/backend/src/queue/processors/InboxProcessorService.ts @@ -234,6 +234,7 @@ export class InboxProcessorService implements OnApplicationShutdown { // アクティビティを処理 try { + this.logger.debug('performing activity', { activityId: activity.id, actorUri: authUser.user.uri, actorId: authUser.user.id, activity }); const result = await this.apInboxService.performActivity(authUser.user, activity); if (result && !result.startsWith('ok')) { this.logger.warn(`inbox activity ignored (maybe): id=${activity.id} reason=${result}`); diff --git a/packages/backend/src/server/ActivityPubServerService.ts b/packages/backend/src/server/ActivityPubServerService.ts index 5cf9a0a5ed..f8b598a92b 100644 --- a/packages/backend/src/server/ActivityPubServerService.ts +++ b/packages/backend/src/server/ActivityPubServerService.ts @@ -115,6 +115,7 @@ export class ActivityPubServerService { @bindThis private async inbox(request: FastifyRequest, reply: FastifyReply) { if (this.meta.federation === 'none') { + this.inboxLogger.debug('federation is disabled'); reply.code(403); return; } @@ -148,17 +149,18 @@ export class ActivityPubServerService { delay: 300_000, }, }); - } catch (err) { - this.inboxLogger.warn('signature header parsing failed', { err }); + this.inboxLogger.debug('signature header parsed', { signature, body: request.body }); + } catch (err) { if (typeof request.body === 'object' && 'signature' in request.body) { // LD SignatureがあればOK this.queueService.inbox(request.body as IActivity, null); + this.inboxLogger.debug('LD Signature found in request body', { err, body: request.body }); reply.code(202); return; } - this.inboxLogger.warn('signature header parsing failed and LD signature not found'); + this.inboxLogger.warn('signature header parsing failed and LD signature not found', { err }); reply.code(401); return; }