1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-27 14:28:49 +09:00

fix(Queue): InboxやDeliverキューにdataフィールドが空のジョブが登録されないように (MisskeyIO#307)

This commit is contained in:
まっちゃとーにゅ 2023-12-31 12:17:18 +09:00 committed by GitHub
parent c64be8b9f9
commit efee8f45f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -121,7 +121,7 @@ export class QueueService {
content,
to: d[0],
isSharedInbox: d[1],
} as DeliverJobData,
},
opts,
})));

View File

@ -162,7 +162,13 @@ export class ActivityPubServerService {
}
}
this.queueService.inbox(request.body as IActivity, signature);
const activity = request.body as IActivity;
if (!activity.type || !signature.keyId) {
reply.code(400);
return;
}
this.queueService.inbox(activity, signature);
reply.code(202);
}