debug log
This commit is contained in:
parent
48b3372520
commit
0933aba453
|
@ -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}`);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue